Event receiver implementation.
EventReceiver(channel, handlers=None, routing_key="#", node_id=None, app=None, queue_prefix=None, accept=None, queue_ttl=None, queue_expires=None)¶
connection (kombu.Connection): Connection to the broker. handlers (Mapping[Callable]): Event handlers.This is a map of event type names and their handlers. The special handler “*” captures all events that don’t have a handler.
__init__(channel, handlers=None, routing_key="#", node_id=None, app=None, queue_prefix=None, accept=None, queue_ttl=None, queue_expires=None)¶
Process event by dispatching to configured handler.
on_consume_ready(connection, channel, consumers, wakeup=True, **kwargs)¶
itercapture(limit=None, timeout=None, wakeup=True)¶
capture(limit=None, timeout=None, wakeup=True)¶
Open up a consumer capturing events.
This has to run in the main process, and it will never stop unless
EventDispatcher.should_stopis set to True, or forced via
event_from_message(body, localize=True, now=None, tzfields=_TZGETTER, adjust_timestamp=adjust_timestamp, CLIENT_CLOCK_SKEW=CLIENT_CLOCK_SKEW)¶
_receive(body, message, list=list, isinstance=isinstance)¶