start task to check migration
This commit is contained in:
parent
48149bd245
commit
56214bf059
47
0007-start-task-to-check-migration.patch
Normal file
47
0007-start-task-to-check-migration.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From c10a2b4ab02efa9f3172aae2741f084a1c477adc Mon Sep 17 00:00:00 2001
|
||||||
|
From: xuezhixin <xuezhixin@uniontech.com>
|
||||||
|
Date: Mon, 13 Nov 2023 15:56:28 +0800
|
||||||
|
Subject: [PATCH] =?UTF-8?q?agent=E8=BF=81=E7=A7=BB=E6=A3=80=E6=B5=8B?=
|
||||||
|
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=89=A7=E8=A1=8C?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
sysmig_agent/fork.py | 23 +++++++++++++++++++++++
|
||||||
|
1 file changed, 23 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
|
||||||
|
index a128722..daea65f 100644
|
||||||
|
--- a/sysmig_agent/fork.py
|
||||||
|
+++ b/sysmig_agent/fork.py
|
||||||
|
@@ -38,3 +38,26 @@ def up_to_date_sql_abi():
|
||||||
|
# 获取abi progress 更新数据库内
|
||||||
|
sql_abi_progress(abi_process)
|
||||||
|
return 0
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+# ABI系统检测
|
||||||
|
+def timed_task_abi(task_id):
|
||||||
|
+ time_task = BackgroundScheduler(timezone='Asia/Shanghai')
|
||||||
|
+ task_id=str(task_id)
|
||||||
|
+ p = time_task.add_job(up_to_date_sql_abi, 'interval', seconds=3)
|
||||||
|
+ time_task.start()
|
||||||
|
+ try:
|
||||||
|
+ task_statue='1'
|
||||||
|
+ p_abi = Process(target=migrate_before_abi_chk, args=(q,task_statue,))
|
||||||
|
+ p_abi.start()
|
||||||
|
+ p_abi.join()
|
||||||
|
+ # Determine whether the message queue is dead or empty to end the timer
|
||||||
|
+ while not q.empty():
|
||||||
|
+ continue
|
||||||
|
+ time_task.shutdown()
|
||||||
|
+ except (KeyboardInterrupt, SystemExit):
|
||||||
|
+ # Not strictly necessary if daemonic mode is enabled but should be done if possible
|
||||||
|
+ time_task.shutdown()
|
||||||
|
+ print('Exit The Job!')
|
||||||
|
+
|
||||||
|
+
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: migration-tools
|
Name: migration-tools
|
||||||
Version: 1.0.3
|
Version: 1.0.3
|
||||||
Release: 6
|
Release: 7
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
@ -13,7 +13,7 @@ Patch003: 0003-export-migration-check-report.patch
|
|||||||
Patch004: 0004-complete-information-report-after-abi-detection.patch
|
Patch004: 0004-complete-information-report-after-abi-detection.patch
|
||||||
Patch005: 0005-abi-detection-through-multi-threads.patch
|
Patch005: 0005-abi-detection-through-multi-threads.patch
|
||||||
Patch006: 0006-add-message-query-to-update-abi-process.patch
|
Patch006: 0006-add-message-query-to-update-abi-process.patch
|
||||||
|
Patch007: 0007-start-task-to-check-migration.patch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -114,6 +114,9 @@ rm -rf /usr/bin/migration-tools
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-7
|
||||||
|
- 0007-start-task-to-check-migration.patch
|
||||||
|
|
||||||
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-6
|
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-6
|
||||||
- 0006-add-message-query-to-update-abi-process.patch
|
- 0006-add-message-query-to-update-abi-process.patch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user