This document describes Celery 2.3. For development docs, go here.
The task has invalid data or is not properly constructed.
format string for the body of an error email.
A request for task execution.
Acknowledge task.
Flag set when the task has been acknowledged.
List of positional arguments to apply to the task.
Body of a chord depending on this task.
Additional delivery info, e.g. contains the path from Producer to consumer.
Format string used to generate error email content.
Format string used to generate error email subjects.
Format string used to log task failure.
The tasks eta (for information only).
Execute the task in a WorkerTaskTrace.
Parameters: |
|
---|
Like execute(), but using the multiprocessing pool.
Parameters: |
|
---|
When the task expires.
Extend the tasks keyword arguments with standard task arguments.
Currently these are logfile, loglevel, task_id, task_name, task_retries, and delivery_info.
See celery.task.base.Task.run() for more information.
Magic keyword arguments are deprecated and will be removed in version 3.0.
Create request from a task message.
Raises UnknownTaskError: | |
---|---|
if the message does not describe a task, the message is also rejected. |
Mapping of keyword arguments to apply to the task.
If expired, mark the task as revoked.
The message object. Used to acknowledge the message.
Kind of task. Must be a name registered in the task registry.
Handler called when task is accepted by worker pool.
Callback called when the task should be acknowledged.
Handler called if the task raised an exception.
Handler called if the task should be retried.
Handler called if the task was successfully processed.
Handler called if the task times out.
Number of times the task has been retried.
Format string used to log task retry.
If revoked, skip task and mark state.
Format string used to log task success.
The task class (set by constructor using task_name).
UUID of the task.
UUID of the taskset that this task belongs to.
Timestamp set when the task is started.
Process id of the worker processing this task (if any).
Keys to keep from the message delivery info. The values of these keys must be pickleable.
Wraps the task in a jail, 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 “SUCCESS”.
If the call raises RetryTaskError, it extracts the original exception, uses that as the result and sets the task status to “RETRY”.
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 evaluated functions return value on success, or the exception instance on failure. |
Execute, trace and store the result of the task.
Handle exception.
Handle retry exception.
Handle successful execution.
Hostname to report as.
Current loader.
This is a pickleable method used as a target when applying to pools.
It’s the same as:
>>> WorkerTaskTrace(task_name, *args, **kwargs).execute_safe()