Update index.py

This commit is contained in:
Mr Chen 2024-04-29 15:19:37 +08:00
parent b0b043f432
commit 5dfd0508da
1 changed files with 4 additions and 2 deletions

View File

@ -232,10 +232,12 @@ def runReplInfo():
if 'repl' in serverStatus:
repl = serverStatus['repl']
# print(repl)
result['status'] = ''
if 'ismaster' in repl and repl['ismaster']:
result['status'] = ''
else:
result['status'] = ''
if 'secondary' in repl and repl['secondary']:
result['status'] = ''
result['setName'] = repl['setName']
result['primary'] = repl['primary']