This document describes an older version of Celery (2.5). For the latest stable version please 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.
Process the received event by dispatching it to the appropriate handler.