From: Michael Tremer Date: Sat, 18 Jun 2022 12:12:20 +0000 (+0000) Subject: queue: Pass builder to fetch a new job X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0a1f367d27250d4d08f95c1a82f422661ae49ea;p=pbs.git queue: Pass builder to fetch a new job Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/jobqueue.py b/src/buildservice/jobqueue.py index a46d3771..a3174490 100644 --- a/src/buildservice/jobqueue.py +++ b/src/buildservice/jobqueue.py @@ -22,7 +22,7 @@ class JobQueue(base.Object): return res.len - def pop(self, arches): + def pop(self, builder): """ Returns the next build job that matches the given architectures """ @@ -36,7 +36,7 @@ class JobQueue(base.Object): WHERE queue.arch = ANY(%s) LIMIT 1""", - arches, + builder.supported_arches, ) def get_length_for_arch(self, arch): diff --git a/src/hub/queue.py b/src/hub/queue.py index 92aca941..c9df566f 100644 --- a/src/hub/queue.py +++ b/src/hub/queue.py @@ -58,7 +58,7 @@ def dispatch_jobs(backend): continue # We are ready for a new job - job = backend.jobqueue.pop(builder.supported_arches) + job = backend.jobqueue.pop(builder) if not job: log.debug(" No jobs waiting") continue