From 5ad4772c33cd2303f55a6d0809ef23446893d9e8 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 6 May 2024 01:14:07 +0800 Subject: [PATCH] Update index.py --- plugins/mongodb/index.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index 9db2882bd..c4da1bffe 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -1006,6 +1006,11 @@ def replSetNode(): arbiterOnly = args['arbiterOnly'].strip() arbiterOnly = int(arbiterOnly) + votes = 1 + if 'votes' in args: + votes = args['votes'] + votes = int(votes) + is_have = False for x in nodes: if x['host'] == add_node: @@ -1017,6 +1022,7 @@ def replSetNode(): t = {} t['host'] = add_node t['priority'] = priority + t['votes'] = votes t['arbiterOnly'] = arbiterOnly nodes.append(t)