From 0f2c2d8cbda956a27bb0eb3ee1a0dd14a55f8e19 Mon Sep 17 00:00:00 2001 From: xuezhixin Date: Fri, 10 Nov 2023 10:27:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0abi=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E5=88=B0=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sysmig_agent/share.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysmig_agent/share.py b/sysmig_agent/share.py index aae815c..27e8ff8 100644 --- a/sysmig_agent/share.py +++ b/sysmig_agent/share.py @@ -20,6 +20,8 @@ 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: @@ -27,6 +29,13 @@ def sql_abi_progress(data): except: pass + +def abi_file_connect(sql_r): + abi_sql = "INSERT INTO agent_ABI_check_result VALUES('"+ get_local_ip()+"'," + sql_r + ',NOW());' + s = DBHelper() + ret_sql_msg = s.execute(abi_sql) + + def getSysMigConf(): confpath = '/etc/migration-tools/migration-tools.conf' if not os.path.exists(confpath): -- 2.20.1