mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 11:48:33 +08:00
Allow handlers to return extra work to the scheduler.
This commit is contained in:
@@ -157,8 +157,11 @@ class MessageWorker(threading.Thread):
|
||||
log.debug("Handler is NO_OP: %s" % idx)
|
||||
else:
|
||||
log.info("Calling %s" % idx)
|
||||
handler(conf, session, msg)
|
||||
further_work = handler(conf, session, msg) or []
|
||||
log.info("Done with %s" % idx)
|
||||
for event in further_work:
|
||||
log.info(" Scheduling faked event %r" % event)
|
||||
self.incoming_work_queue.put(event)
|
||||
|
||||
|
||||
class Poller(threading.Thread):
|
||||
|
||||
Reference in New Issue
Block a user