From 7f707f9aac6835a47a4e1f3c3878822bdf2f99bb Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 17 May 2024 01:08:13 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index c6814157f..aa4cfb8d6 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -3347,6 +3347,7 @@ def doFullSyncUser(version=''): # --force --opt --single-transaction # --skip-opt --create-options # --master-data=1 + time_s = time.time() if not os.path.exists(bak_file): # 不锁表导出 if isSimpleSyncCmd(cmd): @@ -3360,10 +3361,11 @@ def doFullSyncUser(version=''): time_s = time.time() r = mw.execShell(dump_sql_data) print(r) - time_e = time.time() - print("export cos:", time_e - time_s) + time_e = time.time() + export_cos = time_e - time_s + print("export cos:", export_cos) - writeDbSyncStatus({'code': 3, 'msg': '正在到本地导入数据中...', 'progress': 40}) + writeDbSyncStatus({'code': 3, 'msg': '导出耗时:'+str(export_cos)+',正在到本地导入数据中...', 'progress': 40}) if os.path.exists(bak_file): # 重置