From 4901910a71a78f381d22c667b130daa0d7796175 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sun, 5 May 2024 20:07:36 +0800 Subject: [PATCH] update --- plugins/mongodb/index.py | 6 +++--- plugins/mongodb/js/mongodb.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index 1df1ad48e..e8f36fb20 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -1061,7 +1061,7 @@ def replInit(): t['_id'] = x t['host'] = n['host'] if 'priority' in n: - t['priority'] = n['priority'] + t['priority'] = int(n['priority']) if 'arbiterOnly' in n and n['arbiterOnly'] == 1: t['arbiterOnly'] = True @@ -1080,8 +1080,8 @@ def replInit(): try: rsStatus = client.admin.command('replSetInitiate',config) except Exception as e: - info = str(e).split(',') - return mw.returnJson(False, str(info[0])) + # info = str(e).split(',') + return mw.returnJson(False, str(e)) return mw.returnJson(True, '设置副本成功!') diff --git a/plugins/mongodb/js/mongodb.js b/plugins/mongodb/js/mongodb.js index b5c3c227d..b025c1c03 100644 --- a/plugins/mongodb/js/mongodb.js +++ b/plugins/mongodb/js/mongodb.js @@ -273,7 +273,7 @@ function mongoReplCfgNodes(){
\ priority:\
\ - \ + \ 值越大,优先权越高\
\
\