|
|
|
@ -3467,6 +3467,11 @@ def doFullSyncUser(version=''): |
|
|
|
|
# --skip-opt --create-options |
|
|
|
|
# --master-data=1 |
|
|
|
|
|
|
|
|
|
find_run_dump = mw.execShell('ps -ef | grep mysqldump | grep -v grep') |
|
|
|
|
if find_run_dump[0] != "": |
|
|
|
|
print("正在远程导出数据中,别着急...") |
|
|
|
|
writeDbSyncStatus({'code': 3.1, 'msg': '正在远程导出数据中,别着急...', 'progress': 21}) |
|
|
|
|
return False |
|
|
|
|
time_s = time.time() |
|
|
|
|
if not os.path.exists(bak_file): |
|
|
|
|
if isSimpleSyncCmd(cmd): |
|
|
|
@ -3486,6 +3491,12 @@ def doFullSyncUser(version=''): |
|
|
|
|
|
|
|
|
|
writeDbSyncStatus({'code': 3, 'msg': '导出耗时:'+str(int(export_cos))+'秒,正在到本地导入数据中...', 'progress': 40}) |
|
|
|
|
|
|
|
|
|
find_run_sync = mw.execShell('ps -ef | grep do_full_sync | grep -v grep') |
|
|
|
|
if find_run_sync[0] != "": |
|
|
|
|
print("正在导入数据中,别着急...") |
|
|
|
|
writeDbSyncStatus({'code': 4.1, 'msg': '正在导入数据中,别着急...', 'progress': 41}) |
|
|
|
|
return False |
|
|
|
|
|
|
|
|
|
time_s = time.time() |
|
|
|
|
if os.path.exists(bak_file): |
|
|
|
|
# 重置 |
|
|
|
@ -3494,7 +3505,7 @@ def doFullSyncUser(version=''): |
|
|
|
|
# 加快导入 - 开始 |
|
|
|
|
# db.execute('set global innodb_flush_log_at_trx_commit = 2') |
|
|
|
|
# db.execute('set global sync_binlog = 2000') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if channel_name != '': |
|
|
|
|
doFullSyncUserImportContentForChannel(bak_file, channel_name) |
|
|
|
|
|
|
|
|
|