This commit is contained in:
Mr Chen 2024-07-04 02:03:15 +08:00
parent 8067c20e5a
commit bc8a874c68
2 changed files with 6 additions and 5 deletions

View File

@ -1994,13 +1994,14 @@ def setDbSlave(version):
def getMasterStatus(version=''):
if status(version) == 'stop':
return mw.returnJson(False, 'MySQL未启动,或正在启动中...!', [])
query_status_cmd = 'show slave status'
mdb8 = getMdb8Ver()
if mw.inArray(mdb8, version):
query_status_cmd = 'show replica status'
try:
if status(version) == 'stop':
return mw.returnJson(False, 'MySQL未启动,或正在启动中...!', [])
conf = getConf()
content = mw.readFile(conf)

View File

@ -2199,6 +2199,8 @@ def setDbSlave(version):
def getMasterStatus(version=''):
if status(version) == 'stop':
return mw.returnJson(False, 'MySQL未启动,或正在启动中...!', [])
query_status_cmd = 'show slave status'
mdb8 = getMdb8Ver()
@ -2206,9 +2208,7 @@ def getMasterStatus(version=''):
query_status_cmd = 'show replica status'
try:
if status(version) == 'stop':
return mw.returnJson(False, 'MySQL未启动,或正在启动中...!', [])
conf = getConf()
content = mw.readFile(conf)
master_status = False