From 2e2aa41f6f32abca8869d7f01697806fb9949348 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 5 Feb 2021 11:37:49 +0800 Subject: [PATCH] up --- plugins/mysql/index.py | 4 ++-- plugins/mysql/js/mysql.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 3b203d581..5ecd1da18 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -1489,7 +1489,7 @@ def deleteSlave(version=''): def fullSync(version=''): - pass + return mw.returnJson(True, '同步成功!') if __name__ == "__main__": func = sys.argv[1] @@ -1588,7 +1588,7 @@ if __name__ == "__main__": print(setSlaveStatus(version)) elif func == 'delete_slave': print(deleteSlave(version)) - else func == 'fullSync': + elif func == 'full_sync': print(fullSync(version)) else: print('error') diff --git a/plugins/mysql/js/mysql.js b/plugins/mysql/js/mysql.js index 9a33dcfba..b09a6bae5 100755 --- a/plugins/mysql/js/mysql.js +++ b/plugins/mysql/js/mysql.js @@ -1344,7 +1344,14 @@ function getFullSyncStatus(db){ console.log(db); + myPost('full_sync', {}, function(data){ + var rdata = $.parseJSON(data.data); + layer.msg(rdata['msg']); + setTimeout(function(){ + masterOrSlaveConf(); + }, 3000); + }); }