Merge pull request #13 from alexh-name/master

actually assign weight from config to hosts != localhost
This commit is contained in:
Joshua M. Boniface 2021-10-13 09:19:10 -04:00 committed by GitHub
commit cfb5907a2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,6 +136,8 @@ def get_target_host():
if type(host) is str or host.get("weight", None) is None:
host_weight = 1
else:
host_weight = int(host.get("weight"))
remote_hosts.append({ "name": host_name, "weight": host_weight, "count": 0, "weighted_count": 0, "bad": False })