This document describes Celery 2.4. For development docs, go here.
Events are messages sent for actions happening in the worker (and clients if CELERY_SEND_TASK_SENT_EVENT is enabled), used for monitoring purposes.
copyright: |
|
---|---|
license: | BSD, see LICENSE for more details. |
Create an event.
An event is a dictionary, the only required field is type.
Send events as messages.
Parameters: |
|
---|
You need to close() this after use.
Close the event dispatcher.
Send event.
Parameters: |
|
---|
Capture events.
Parameters: |
|
---|
handlers is a dict of event types and their handlers, the special handler “*” captures all events that doesn’t have a handler.
Open up a consumer capturing events.
This has to run in the main process, and it will never stop unless forced via KeyboardInterrupt or SystemExit.
Create event consumer.
Warning
This creates a new channel that needs to be closed by calling consumer.channel.close().
Process the received event by dispatching it to the appropriate handler.