From a8b97bf6d7cfb1d36a30af9430ab98eb872d5866 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 6 May 2024 01:33:14 +0800 Subject: [PATCH] Update index.py --- plugins/mongodb/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index b65c84162..bbe3e1812 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -1111,6 +1111,7 @@ def replClose(): } client = mongdbClient() + db = client.admin try: # {force:True} # repl_info = client.admin.command('replSetGetStatus') @@ -1118,7 +1119,7 @@ def replClose(): # del repl_info['set'] # print(repl_info) - rsStatus = client.admin.command('replSetReconfig',config) + rsStatus = db.command('replSetReconfig',config) except Exception as e: info = str(e).split(',') return mw.returnJson(False, str(info[0]))