From a537521ecd6a46d750ebdd740e36b22f88d8a353 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Aug 11 2021 10:43:12 +0000 Subject: Don't take new tasks if we've 0.0 capacity available If I've just started buildArch task with weight 1.5 on builder with 1.5 capacity, it can pick another one, as it is not over the builder's capacity. This is wrong as there is no real capacity behind. --- diff --git a/koji/daemon.py b/koji/daemon.py index bcd01b2..0847b51 100644 --- a/koji/daemon.py +++ b/koji/daemon.py @@ -981,7 +981,7 @@ class TaskManager(object): # determine our normalized bin rank for pos, cap in enumerate(bin_avail): - if our_avail >= cap: + if our_avail > cap: break if len(bin_avail) > 1: rank = float(pos) / (len(bin_avail) - 1)