celery.worker
Executes tasks waiting in the task queue.
Parameters: |
|
---|
Execute the next task on the queue using the multiprocessing pool.
Catches all exceptions and logs them with level logging.CRITICAL.
Fetch the next task from the AMQP broker.
Raises EmptyQueue exception if there is no message waiting on the queue.
Returns: | TaskWrapper instance. |
---|
Receive the next message from the message broker.
Tries to reset the AMQP connection if not available. Returns None if no message is waiting on the queue.
Return type: | carrot.messaging.Message instance. |
---|
Reset the AMQP connection, and reinitialize the celery.messaging.TaskConsumer instance.
Resets the task consumer in task_consumer.
Schedule all waiting periodic tasks for execution.
Return type: | list of celery.models.PeriodicTaskMeta objects. |
---|
Class wrapping a task to be run.
Parameters: |
---|
Execute the task in a jail() and store return value and status in the task meta backend.
Parameters: |
|
---|
Like execute(), but using the multiprocessing pool.
Parameters: |
|
---|
:returns multiprocessing.AsyncResult instance.
Extend the tasks keyword arguments with standard task arguments.
These are logfile, loglevel, task_id and task_name.
Create a TaskWrapper from a task message sent by celery.messaging.TaskPublisher.
Raises UnknownTask: | |
---|---|
if the message does not describe a task, the message is also rejected. | |
Returns: | TaskWrapper instance. |
Wraps the task in a jail, which catches all exceptions, and saves the status and result of the task execution to the task meta backend.
If the call was successful, it saves the result to the task result backend, and sets the task status to "DONE".
If the call results in an exception, it saves the exception as the task result, and sets the task status to "FAILURE".
Parameters: |
|
---|---|
Returns: | the function return value on success. |
Returns: | the exception instance on failure. |