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:
Mike McLean 2009-11-18 08:58:04 -05:00
parent a06d578023
commit ac226539cf

View file

@ -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