From: Michael Tremer Date: Mon, 17 Feb 2025 11:46:26 +0000 (+0000) Subject: jobs: Add more debug logging when dispatching jobs X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86f8a8aa59282f023a5b736d996e8638d1f5924c;p=pbs.git jobs: Add more debug logging when dispatching jobs Signed-off-by: Michael Tremer --- 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)