42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From f9a676fb7297beb5e40af2fc39e1c872c33ffded Mon Sep 17 00:00:00 2001
|
|
From: xuezhixin <xuezhixin@uniontech.com>
|
|
Date: Mon, 13 Nov 2023 16:30:34 +0800
|
|
Subject: [PATCH] =?UTF-8?q?agent=E6=94=B6=E5=88=B0=E8=AF=B7=E6=B1=82?=
|
|
=?UTF-8?q?=E5=90=8E=E5=88=86=E5=8F=91=E4=BB=BB=E5=8A=A1?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
---
|
|
sysmig_agent/fork.py | 17 +++++++++++++++++
|
|
1 file changed, 17 insertions(+)
|
|
|
|
diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
|
|
index 8ad6d59..679fb21 100644
|
|
--- a/sysmig_agent/fork.py
|
|
+++ b/sysmig_agent/fork.py
|
|
@@ -266,3 +266,20 @@ def if_env_check(data):
|
|
return False
|
|
|
|
|
|
+def post_task(data):
|
|
+ task_mod = json.loads(data).get('mod')
|
|
+ if 'check_info' == task_mod:
|
|
+ t = threading.Thread(target=check_info, args=[data])
|
|
+ elif 'check_repo' == task_mod:
|
|
+ t = threading.Thread(target=check_repo, args=[data])
|
|
+ elif 'check_kernel' == task_mod:
|
|
+ t = threading.Thread(target=check_kernel, args=[data])
|
|
+ elif 'check_environment' == task_mod:
|
|
+ if if_env_check(data):
|
|
+ t = threading.Thread(target=check_environment, args=[data])
|
|
+ elif 'system_migration' == task_mod:
|
|
+ t = threading.Thread(target=system_migration, args=[data])
|
|
+ t.start()
|
|
+ return 'y'
|
|
+
|
|
+
|
|
--
|
|
2.20.1
|
|
|