This document describes Celery 2.3. For development docs, go here.
Listen for messages received from the broker and move them to the ready queue for task processing.
Parameters: |
|
---|
Method called by the timer to apply a task with an ETA/countdown.
The consumer used to consume broadcast commands.
Closes the current broker connection and all open channels.
The broker connection.
Consume messages forever (or until an exception is raised).
Timer for tasks with an ETA/countdown.
A celery.events.EventDispatcher for sending events.
The thread that sends event heartbeats at regular intervals. The heartbeats are used by monitors to detect that a worker went off-line/disappeared.
The current hostname. Defaults to the system hostname.
Returns information about this consumer instance as a dict.
This is also the consumer related info returned by celeryctl stats.
Optional callback to be called when the connection is established. Will only be called once, even if the connection is lost and re-established.
Initial QoS prefetch count for the task channel.
The logger instance to use. Defaults to the default Celery logger.
Applies function but ignores any connection or channel errors raised.
Process remote control command message.
Callback called if an error occurs while decoding a message received.
Simply logs the error and acknowledges the message so it doesn’t enter a loop.
Parameters: |
|
---|
Handle received task.
If the task has an eta we enter it into the ETA schedule, otherwise we move it the ready queue for immediate processing.
The process mailbox (kombu pidbox node).
The current worker pool instance.
A timer used for high-priority internal tasks, such as sending heartbeats.
The queue that holds tasks ready for immediate processing.
Handles incoming messages.
Parameters: |
|
---|
Re-establish the broker connection and set up consumers, heartbeat and the event dispatcher.
Sets up the process mailbox.
Restart the heartbeat thread.
This thread sends heartbeat events at intervals so monitors can tell if the worker is off-line/missing.
Enable/disable events.
Start the consumer.
Automatically survives intermittent connection failure, and will retry establishing the connection and restart consuming messages.
Stop consuming.
Does not close the broker connection, so be sure to call close_connection() when you are finished with it.
Stop consuming tasks and broadcast commands, also stops the heartbeat thread and event dispatcher.
Parameters: | close_connection – Set to False to skip closing the broker connection. |
---|
The consumer used to consume task messages.
Error message for when an invalid task message is received.
Prefetch count can’t exceed short.
Quality of Service for Channel.
For thread-safe increment/decrement of a channels prefetch count value.
Parameters: |
|
---|
Decrement the current prefetch count value by n.
Decrement the value, but do not update the qos.
The MainThread will be responsible for calling update() when necessary.
Increment the current prefetch count value by n.
Set channel prefetch_count setting.
Update prefetch count with current value.
Error message for when an unregistered task is received.