fix incorrect divisions

This commit is contained in:
Tomas Kopecek 2018-05-16 10:37:34 +02:00 committed by Mike McLean
parent 8e61dc7c56
commit b37236d7ae
4 changed files with 11 additions and 11 deletions

View file

@ -1206,7 +1206,7 @@ class BuildArchTask(BaseBuildTask):
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)
adj = avg / 4800.0
# cap the adjustment at +4.5
weight = self.weight() + min(4.5, adj)
self.session.host.setTaskWeight(self.id, weight)