Skip to content

Commit 8c228ed

Browse files
'score_scale' multiplier needs to be a float or odd-numbers will break it
1 parent f164d8b commit 8c228ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongodb_consistent_backup/Replication/Replset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def find_secondary(self, force=False, quiet=False):
194194
elif member['state'] == self.state_secondary and member['health'] > 0:
195195
log_data = {}
196196
score = self.max_lag_secs * 10
197-
score_scale = 100 / score
197+
score_scale = 100.00 / float(score)
198198
priority = 0
199199
if 'hidden' in member_config and member_config['hidden']:
200200
score += (score * self.hidden_weight)

0 commit comments

Comments
 (0)