Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# A list of all builders that have a connection
connections = []
-def dispatch_jobs(backend):
+async def dispatch_jobs(backend):
"""
Will be called regularly and will dispatch any pending jobs to any
available builders
log.debug(" No jobs processable for %s" % builder)
+ # If there is no job for the builder, we might as well shut it down
+ await builder.stop()
+
class QueueHandler(BackendMixin, HTTPBasicAuthMixin, tornado.websocket.WebSocketHandler):
"""
Builders connect to this handler which will add them to a list of connections.