add process data in database
This commit is contained in:
parent
c49493e172
commit
06b43801bd
42
0017-add-process-data-in-database.patch
Normal file
42
0017-add-process-data-in-database.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From a3b140660e4180fdeddc7d2bb8009a78218a9235 Mon Sep 17 00:00:00 2001
|
||||||
|
From: xuezhixin <xuezhixin@uniontech.com>
|
||||||
|
Date: Fri, 10 Nov 2023 10:21:12 +0800
|
||||||
|
Subject: [PATCH] =?UTF-8?q?agent=E5=A2=9E=E5=8A=A0=E4=BB=BB=E5=8A=A1?=
|
||||||
|
=?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E5=BA=93?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
sysmig_agent/share.py | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sysmig_agent/share.py b/sysmig_agent/share.py
|
||||||
|
index ea3d63a..aae815c 100644
|
||||||
|
--- a/sysmig_agent/share.py
|
||||||
|
+++ b/sysmig_agent/share.py
|
||||||
|
@@ -9,7 +9,7 @@ import shutil
|
||||||
|
import subprocess
|
||||||
|
import socket
|
||||||
|
from sysmig_agent.utils import list_to_json
|
||||||
|
-
|
||||||
|
+from connect_sql import DBHelper
|
||||||
|
|
||||||
|
def get_local_ip():
|
||||||
|
try:
|
||||||
|
@@ -20,6 +20,12 @@ def get_local_ip():
|
||||||
|
finally:
|
||||||
|
s.close()
|
||||||
|
|
||||||
|
+def sql_abi_progress(data):
|
||||||
|
+ sql = "UPDATE agent_task SET task_progress = {} ,task_Updatetime = NOW() WHERE agent_ip = '{}';".format(data, get_local_ip())
|
||||||
|
+ try:
|
||||||
|
+ ret = DBHelper().execute(sql)
|
||||||
|
+ except:
|
||||||
|
+ pass
|
||||||
|
|
||||||
|
def getSysMigConf():
|
||||||
|
confpath = '/etc/migration-tools/migration-tools.conf'
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: migration-tools
|
Name: migration-tools
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 16
|
Release: 17
|
||||||
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
|
||||||
@ -23,7 +23,7 @@ Patch13: 0013-display-agent-host-information.patch
|
|||||||
Patch14: 0014-modify-task-stream-interface.patch
|
Patch14: 0014-modify-task-stream-interface.patch
|
||||||
Patch15: 0015-delete-host-information-interface.patch
|
Patch15: 0015-delete-host-information-interface.patch
|
||||||
Patch16: 0016-get-local-ip-on-the-agent.patch
|
Patch16: 0016-get-local-ip-on-the-agent.patch
|
||||||
|
Patch17: 0017-add-process-data-in-database.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
%description
|
%description
|
||||||
@ -121,6 +121,9 @@ rm -rf /usr/bin/migration-tools
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-17
|
||||||
|
- 0017-add-process-data-in-database.patch
|
||||||
|
|
||||||
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-16
|
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-16
|
||||||
- 0016-get-local-ip-on-the-agent.patch
|
- 0016-get-local-ip-on-the-agent.patch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user