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
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)