Multiprocessing Worker - celery.worker

celery.worker

exception celery.worker.EmptyQueue
The message queue is currently empty.
class celery.worker.TaskDaemon(concurrency=None, logfile=None, loglevel=None, queue_wakeup_after=None)

Executes tasks waiting in the task queue.

concurrency is the number of simultaneous processes.

run()
The worker server’s main loop.
run_periodic_tasks()

Schedule all waiting periodic tasks for execution.

Returns list of celery.models.PeriodicTaskMeta objects.

schedule_retry_tasks()
Reschedule all requeued tasks waiting for retry.
class celery.worker.TaskWrapper(task_name, task_id, task_func, args, kwargs)

Class defining a task to be run.

execute(loglevel, logfile)
Execute the task in a jail() and store its result and status in the task meta backend.
execute_using_pool(pool, loglevel, logfile)
Like execute, but using the multiprocessing pool.
extend_kwargs_with_logging(loglevel, logfile)

Extend the tasks keyword arguments with standard task arguments.

These are logfile, loglevel, task_id and task_name.

classmethod from_message(message)
Create a TaskWrapper from a message returned by celery.messaging.TaskConsumer.
exception celery.worker.UnknownTask
Got an unknown task in the queue. The message is requeued and ignored.
celery.worker.jail(task_id, callable_, args, kwargs)
Wraps the task in a jail which saves the status and result of the task execution to the task meta backend.

Previous topic

Task Discovery - celery.discovery

Next topic

Backends - celery.backends

This Page