get task process and migration stage information

This commit is contained in:
xuezhixin 2024-11-04 17:48:17 +08:00
parent 65d653a377
commit 771c0d4cb1
2 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,35 @@
From 492a8e59c09991cb8bd1550cf62e849c15e1e517 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Fri, 10 Nov 2023 10:30:03 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BB=BB=E5=8A=A1=E8=BF=9B?=
=?UTF-8?q?=E5=BA=A6=E5=92=8C=E8=BF=81=E7=A7=BB=E9=98=B6=E6=AE=B5=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/share.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sysmig_agent/share.py b/sysmig_agent/share.py
index 27e8ff8..0c989a8 100644
--- a/sysmig_agent/share.py
+++ b/sysmig_agent/share.py
@@ -30,6 +30,13 @@ def sql_abi_progress(data):
pass
+def sql_show_tables():
+ sql = "SELECT task_progress,task_data FROM agent_task WHERE agent_ip = '{}';".format(get_local_ip())
+ ret_sql_msg_info = DBHelper().execute(sql)
+ if ret_sql_msg_info:
+ print(str(ret_sql_msg_info.fetchall()) + '\n')
+
+
def abi_file_connect(sql_r):
abi_sql = "INSERT INTO agent_ABI_check_result VALUES('"+ get_local_ip()+"'," + sql_r + ',NOW());'
s = DBHelper()
--
2.20.1

View File

@ -1,6 +1,6 @@
Name: migration-tools
Version: 1.0.2
Release: 19
Release: 20
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
@ -26,7 +26,7 @@ Patch16: 0016-get-local-ip-on-the-agent.patch
Patch17: 0017-add-process-data-in-database.patch
Patch18: 0018-detection-of-imported-host-information-interface.patch
Patch19: 0019-update-abi-result-to-database.patch
Patch20: 0020-get-task-process-and-migration-stage-information.patch
BuildArch: noarch
BuildRequires: systemd
@ -125,6 +125,9 @@ rm -rf /usr/bin/migration-tools
%endif
%changelog
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-20
- 0020-get-task-process-and-migration-stage-information.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-19
- 0019-update-abi-result-to-database.patch