diff --git a/0015-agent-sends-the-task-after-receving-the-request.patch b/0015-agent-sends-the-task-after-receving-the-request.patch new file mode 100644 index 0000000000000000000000000000000000000000..f6ae871418ecca172b4b5b29f2e90b104b5e6161 --- /dev/null +++ b/0015-agent-sends-the-task-after-receving-the-request.patch @@ -0,0 +1,41 @@ +From f9a676fb7297beb5e40af2fc39e1c872c33ffded Mon Sep 17 00:00:00 2001 +From: xuezhixin +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 + diff --git a/migration-tools.spec b/migration-tools.spec index 9073361dda670f6e49a0802ff3872b649a02c145..32073119b6c15c4b15a7db7ebceb480581366293 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -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 - 1.0.3-15 +- 0015-agent-sends-the-task-after-receving-the-request.patch + * Mon Nov 11 2024 xuezhixin - 1.0.3-14 - 0014-compare-with-request-agent-ip.patch