mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00
builders.py: fix bonus time calculation
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
fda674dec6
commit
e21c1123a2
|
@ -181,7 +181,7 @@ for builder in config.subbuilders:
|
||||||
# Add 2 seconds * length as the weight so tightly constrained builders go first
|
# Add 2 seconds * length as the weight so tightly constrained builders go first
|
||||||
builder_bonuses = {}
|
builder_bonuses = {}
|
||||||
for builder in config.builder_to_workers:
|
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)
|
builder_bonuses[builder] = timedelta(seconds=bonus)
|
||||||
|
|
||||||
# Modified default algothirm from buildbot with a bonus mechanism (thanks tardyp!)
|
# Modified default algothirm from buildbot with a bonus mechanism (thanks tardyp!)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user