Pick events class from v4
This commit is contained in:
parent
04eccbe250
commit
acded35e1a
6 changed files with 82 additions and 49 deletions
10
consumer.py
10
consumer.py
|
@ -205,11 +205,17 @@ class EventConsumer:
|
|||
|
||||
def run(self, context):
|
||||
try:
|
||||
self.evt.launch_check()
|
||||
self.evt.check()
|
||||
except:
|
||||
logger.exception("Error during event end")
|
||||
|
||||
# Reappend the event in the queue if it has next iteration
|
||||
if self.evt.next is not None:
|
||||
context.add_event(self.evt, self.evt.id)
|
||||
context.add_event(self.evt, eid=self.evt.id)
|
||||
|
||||
# Or remove reference of this event
|
||||
elif hasattr(self.evt, "module_src") and self.evt.module_src is not None:
|
||||
self.evt.module_src.REGISTERED_EVENTS.remove(self.evt.id)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue