]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Builders with too many jobs are not candidates for building
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 Oct 2017 18:29:10 +0000 (18:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 Oct 2017 18:29:10 +0000 (18:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index 3489122770dbf5ab9cb5b03e2949a5c57d9d6727..1efc4cc3a0358e1c6eccac1e88da4f49f467a8ba 100644 (file)
@@ -359,6 +359,9 @@ class Job(base.DataObject):
                # Remove all builders that are not available
                builders = (b for b in builders if b.enabled and b.is_online())
 
+               # Remove all builders that have too many jobs
+               builders = (b for b in builders if not b.too_many_jobs)
+
                # Sort them by the fastest builder first
                return sorted(builders, key=lambda b: -b.performance_index)