update migration status to database
This commit is contained in:
parent
3aaae0d2ef
commit
0d1b7637e4
41
0025-update-migration-status-to-database.patch
Normal file
41
0025-update-migration-status-to-database.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 04d1e8e872dab7113d5cc80cd3cdf38e93d4bc30 Mon Sep 17 00:00:00 2001
|
||||||
|
From: xuezhixin <xuezhixin@uniontech.com>
|
||||||
|
Date: Fri, 10 Nov 2023 10:47:31 +0800
|
||||||
|
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BF=81=E7=A7=BB=E4=BB=BB?=
|
||||||
|
=?UTF-8?q?=E5=8A=A1=E7=9A=84=E7=8A=B6=E6=80=81=E5=88=B0=E6=95=B0=E6=8D=AE?=
|
||||||
|
=?UTF-8?q?=E5=BA=93?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
sysmig_agent/share.py | 13 ++++++++++++-
|
||||||
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sysmig_agent/share.py b/sysmig_agent/share.py
|
||||||
|
index 5a51266..a3b2c2d 100644
|
||||||
|
--- a/sysmig_agent/share.py
|
||||||
|
+++ b/sysmig_agent/share.py
|
||||||
|
@@ -54,7 +54,18 @@ def sql_mig_statue(statue):
|
||||||
|
ret = DBHelper().execute(sql)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def sql_task_statue(statue, task_id = None):
|
||||||
|
+ if task_id:
|
||||||
|
+ sql = "UPDATE agent_task SET task_status = {} , task_Updatetime = NOW() WHERE task_id = '{}';".format(statue, task_id)
|
||||||
|
+ else:
|
||||||
|
+ sql = "UPDATE agent_task SET task_status = {} , task_Updatetime = NOW() WHERE agent_ip = '{}';".format(statue, get_local_ip())
|
||||||
|
+ try:
|
||||||
|
+ ret = DBHelper().execute(sql)
|
||||||
|
+ except Exception :
|
||||||
|
+ pass
|
||||||
|
+
|
||||||
|
|
||||||
|
def sql_show_tables():
|
||||||
|
sql = "SELECT task_progress,task_data FROM agent_task WHERE agent_ip = '{}';".format(get_local_ip())
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: migration-tools
|
Name: migration-tools
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 24
|
Release: 25
|
||||||
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
|
||||||
@ -31,6 +31,7 @@ Patch21: 0021-get-agent-ip-interface.patch
|
|||||||
Patch22: 0022-udpate-agent-host-status-online.patch
|
Patch22: 0022-udpate-agent-host-status-online.patch
|
||||||
Patch23: 0023-update-the-status-of-the-migration-phase.patch
|
Patch23: 0023-update-the-status-of-the-migration-phase.patch
|
||||||
Patch24: 0024-add-url-processing-function.patch
|
Patch24: 0024-add-url-processing-function.patch
|
||||||
|
Patch25: 0025-update-migration-status-to-database.patch
|
||||||
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -130,6 +131,9 @@ rm -rf /usr/bin/migration-tools
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-25
|
||||||
|
- 0025-update-migration-status-to-database.patch
|
||||||
|
|
||||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-24
|
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-24
|
||||||
- 0024-add-url-processing-function.patch
|
- 0024-add-url-processing-function.patch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user