This commit is contained in:
Mr Chen
2024-05-05 20:07:36 +08:00
parent 286be2a9f6
commit 4901910a71
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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, '设置副本成功!')
+1 -1
View File
@@ -273,7 +273,7 @@ function mongoReplCfgNodes(){
<div class='line'>\
<span class='tname'>priority:</span>\
<div class='info-r'>\
<input class='bt-input-text mr5' type='number' name='priority' style='width:220px' value='0'/>\
<input class='bt-input-text mr5' type='number' name='priority' style='width:220px' value='1'/>\
<span class='c9'>值越大,优先权越高</span>\
</div>\
</div>\