From 8d9eb6302cdddba9a978a1bb2eb34b6e9f4a4d6d Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 17 May 2024 03:20:29 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 321e175b0..df9c4cf2f 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -3449,13 +3449,13 @@ def doFullSyncUser(version=''): db.query("start all slaves") - writeDbSyncStatus({'code': 6, 'msg': '从库重启完成...', 'progress': 100}) - - # if os.path.exists(bak_file): - # os.system("rm -rf " + bak_file) - time_all_e = time.time() - print("cos:", time_all_e - time_all_s) + cos = time_all_e - time_all_s + writeDbSyncStatus({'code': 6, 'msg': '总耗时'+str(int(cos))+'从库重启完成...', 'progress': 100}) + + if os.path.exists(bak_file): + os.system("rm -rf " + bak_file) + return True