From 3c2e48c16b86c96b13cd0f9c4c87c46f47c9203e Mon Sep 17 00:00:00 2001 From: alexh-name Date: Sat, 3 Jul 2021 01:08:58 +0200 Subject: [PATCH] actually assign weight from config to hosts != localhost --- rffmpeg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rffmpeg.py b/rffmpeg.py index ae82f12..f612b96 100755 --- a/rffmpeg.py +++ b/rffmpeg.py @@ -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 })