This document describes an older version of Celery (2.1). For the latest stable version please go here.
Pending task result using the default backend.
Parameters: | task_id – see task_id. |
---|
The unique identifier for this task.
Instance of celery.backends.DefaultBackend.
Base class for pending result, supports custom task result backend.
Parameters: |
---|
The unique identifier for this task.
The task result backend used.
The operation timed out.
Returns True if the task failed by exception.
Forget about (and possibly remove the result of) this task.
Returns True if the task executed successfully, or raised an exception.
If the task is still running, pending, or is waiting for retry then False is returned.
When the task has been executed, this contains the return value.
If the task raised an exception, this will be the exception instance.
Send revoke signal to all workers.
The workers will ignore the task if received.
The current status of the task.
Can be one of the following:
PENDING
The task is waiting for execution.STARTED
The task has been started.RETRY
The task is to be retried, possibly because of failure.FAILURE
The task raised an exception, or has been retried more times than its limit. The result attribute contains the exception raised.SUCCESS
The task executed successfully. The result attribute contains the resulting value.
Returns True if the task executed successfully.
Get the traceback of a failed task.
Wait for task, and return the result when it arrives.
Parameters: | timeout – How long to wait, in seconds, before the operation times out. |
---|---|
Raises celery.exceptions.TimeoutError: | |
if timeout is not None and the result does not arrive within timeout seconds. |
If the remote call raised an exception then that exception will be re-raised.
Result that we know has already been executed.
The operation timed out.
Returns True if the task has been executed.
The tasks return value
The tasks state.
Returns True if the task executed without failure.
The traceback if the task failed.
Wait until the task has been executed and return its result.
Working with TaskSet results.
An instance of this class is returned by TaskSet‘s apply_async(). It enables inspection of the subtasks status and return values as a single entity.
Option taskset_id: | |
---|---|
see taskset_id. | |
Option subtasks: | |
see subtasks. |
The UUID of the taskset itself.
A list of AsyncResult instances for all of the subtasks.
Task completion count.
Returns: | the number of tasks completed. |
---|
Did the taskset fail?
Returns: | True if any of the tasks in the taskset failed. (i.e., raised an exception) |
---|
Forget about (and possible remove the result of) all the tasks in this taskset.
Iterate over the return values of the tasks as they finish one by one.
Raises: | The exception if any of the tasks raised an exception. |
---|
Taskset subtask iterator.
Returns: | an iterator for iterating over the tasksets AsyncResult objects. |
---|
Gather the results of all tasks in the taskset, and returns a list ordered by the order of the set.
Parameters: |
|
---|---|
Raises celery.exceptions.TimeoutError: | |
if timeout is not None and the operation takes longer than timeout seconds. |
|
Returns: | list of return values for all subtasks in order. |
Is the task ready?
Returns: | True if all of the tasks in the taskset has been executed. |
---|
Restore previously saved taskset result.
Save taskset result for later retrieval using restore().
Example:
>>> result.save()
>>> result = TaskSetResult.restore(task_id)
Was the taskset successful?
Returns: | True if all of the tasks in the taskset finished successfully (i.e. did not raise an exception). |
---|
Is the taskset waiting?
Returns: | True if any of the tasks in the taskset is still waiting for execution. |
---|