agent sends the task after receving the request
This commit is contained in:
parent
84c12a11a3
commit
130dcc214c
41
0015-agent-sends-the-task-after-receving-the-request.patch
Normal file
41
0015-agent-sends-the-task-after-receving-the-request.patch
Normal file
@ -0,0 +1,41 @@
|
||||
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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.3
|
||||
Release: 14
|
||||
Release: 15
|
||||
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
|
||||
@ -21,7 +21,7 @@ Patch011: 0011-initializate-the-migration-status.patch
|
||||
Patch012: 0012-get-agent-kernel-version.patch
|
||||
Patch013: 0013-set-agent-migration-task.patch
|
||||
Patch014: 0014-compare-with-request-agent-ip.patch
|
||||
|
||||
Patch015: 0015-agent-sends-the-task-after-receving-the-request.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
@ -120,6 +120,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-15
|
||||
- 0015-agent-sends-the-task-after-receving-the-request.patch
|
||||
|
||||
* Mon Nov 11 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.3-14
|
||||
- 0014-compare-with-request-agent-ip.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user