add message query to update abi process
This commit is contained in:
parent
f84f8ce10f
commit
48149bd245
64
0006-add-message-query-to-update-abi-process.patch
Normal file
64
0006-add-message-query-to-update-abi-process.patch
Normal file
@ -0,0 +1,64 @@
|
||||
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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.3
|
||||
Release: 5
|
||||
Release: 6
|
||||
License: MulanPSL-2.0
|
||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
@ -12,7 +12,7 @@ Patch002: 0002-get-information-before-migration.patch
|
||||
Patch003: 0003-export-migration-check-report.patch
|
||||
Patch004: 0004-complete-information-report-after-abi-detection.patch
|
||||
Patch005: 0005-abi-detection-through-multi-threads.patch
|
||||
|
||||
Patch006: 0006-add-message-query-to-update-abi-process.patch
|
||||
|
||||
|
||||
|
||||
@ -114,6 +114,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-6
|
||||
- 0006-add-message-query-to-update-abi-process.patch
|
||||
|
||||
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-5
|
||||
- 0005-abi-detection-through-multi-threads.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user