ignore negative average task duration when adjusting task weight
see: https://www.redhat.com/archives/fedora-buildsys-list/2009-November/msg00013.html
This commit is contained in:
parent
a06d578023
commit
ac226539cf
1 changed files with 3 additions and 0 deletions
|
|
@ -2035,6 +2035,9 @@ class BuildArchTask(BaseTaskHandler):
|
|||
avg = session.getAverageBuildDuration(name)
|
||||
if not avg:
|
||||
return
|
||||
if avg < 0:
|
||||
self.logger.warn("Negative average build duration for %s: %s", name, avg)
|
||||
return
|
||||
# increase the task weight by 0.75 for every hour of build duration
|
||||
adj = (avg / 4800.0)
|
||||
# cap the adjustment at +4.5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue