From 8d24d1c2a6462c4516127024c933ec9e793c518d Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 15:48:30 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF=E9=98=9F?=
 =?UTF-8?q?=E5=88=97=E6=9B=B4=E6=96=B0abi=E6=A3=80=E6=B5=8B=E8=BF=9B?=
 =?UTF-8?q?=E5=BA=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 sysmig_agent/fork.py | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 sysmig_agent/fork.py

diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
new file mode 100644
index 0000000..a128722
--- /dev/null
+++ b/sysmig_agent/fork.py
@@ -0,0 +1,40 @@
+# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+# SPDX-License-Identifier:   MulanPubL-2.0-or-later
+
+import platform
+import threading
+from multiprocessing import Process, Queue
+from apscheduler.schedulers.background import BackgroundScheduler
+import time
+import os
+import sys
+from sysmig_agent.abi_weight import *
+from sysmig_agent.Abisystmcompchk import migrate_before_abi_chk, migrate_behind_abi_chk
+import socket
+#from share import *
+from sysmig_agent.short_task import *
+
+from sysmig_agent.migration import *
+#sys.path.append("..")
+#from connect_sql import DBHelper
+from sysmig_agent.agent_request import post_server
+
+# create message query
+q = Queue(maxsize=0)
+
+
+# 定时任务
+def up_to_date_sql_abi():
+    # 获得sql的任务ID
+    # ret_task = get_sql_message()
+    # print('Get message query : ' + str(ret_task[0]))
+    # 获得ABI消息队列信息tuple
+    ret_abi_info = get_abi_info()
+    if ret_abi_info:
+        abi_process = ret_abi_info[0]
+        abi_task = ret_abi_info[1]
+    else:
+        return 1
+    # 获取abi progress 更新数据库内
+    sql_abi_progress(abi_process)
+    return 0
-- 
2.20.1

