Worker Control - celery.worker.control

class celery.worker.control.ControlDispatch(logger=None, hostname=None, listener=None)

Execute worker control panel commands.

class Panel(logger, listener, hostname=None)
classmethod register(method, name=None)
ControlDispatch.ReplyPublisher

alias of ControlReplyPublisher

ControlDispatch.dispatch_from_message(message)

Dispatch by using message data received by the broker.

Example:

>>> def receive_message(message_data, message):
...     control = message_data.get("control")
...     if control:
...         ControlDispatch().dispatch_from_message(control)
ControlDispatch.execute(command, kwargs=None, reply_to=None)

Execute control command by name and keyword arguments.

Parameters:
  • command – Name of the command to execute.
  • kwargs – Keyword arguments.
ControlDispatch.reply(*args, **kwargs)

Previous topic

Worker Heartbeats - celery.worker.heartbeat

Next topic

Built-in Remote Control Commands - celery.worker.control.builtins

This Page