[yocto-autobuilder2][PATCH] builders.py: fix bonus time calculation


Trevor Gamblin
 

Modify the builder_bonuses calculation so that it provides variable
bonus time based on the builder, rather than a constant value.

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
---
builders.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builders.py b/builders.py
index 5773950..f94d1dd 100644
--- a/builders.py
+++ b/builders.py
@@ -145,7 +145,7 @@ for builder in config.subbuilders:
# Add 2 seconds * length as the weight so tightly constrained builders go first
builder_bonuses = {}
for builder in config.builder_to_workers:
- bonus = (len(config.workers) - len(config.builder_to_workers)) * 2
+ bonus = (len(config.workers) - len(config.builder_to_workers[builder])) * 2
builder_bonuses[builder] = timedelta(seconds=bonus)

# Modified default algothirm from buildbot with a bonus mechanism (thanks tardyp!)
--
2.31.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.