From 86f8a8aa59282f023a5b736d996e8638d1f5924c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 17 Feb 2025 11:46:26 +0000 Subject: [PATCH] jobs: Add more debug logging when dispatching jobs Signed-off-by: Michael Tremer --- src/buildservice/jobs.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index 9e53516c..85557d70 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -361,19 +361,26 @@ class Queue(base.Object): async for builder in self.backend.builders.least_busy: # Skip any builders that are not enabled if not builder.enabled: + log.debug("%s is not enabled" % builder) continue # Skip any builders that are not connected elif not builder.is_online(): + log.debug("%s is not online" % builder) continue # Skip any builders that are already full elif await builder.is_full(): + log.debug("%s is full" % builder) continue # Add it to the queue builders.put(builder) + # Log if there are no builders + if builders.empty(): + log.warning("There are no builders to dispatch any jobs to") + # Run for as long as we have unprocessed builders while not builders.empty(): # Take the first builder @@ -385,6 +392,8 @@ class Queue(base.Object): try: # We are ready for a new job async for job in self.get_jobs_for_builder(builder): + log.debug("Looking at %s for %s..." % (job, builder)) + # Perform installcheck (just to be sure) if not await job.installcheck(): log.debug("Job %s failed its installcheck" % job) -- 2.47.3