Celery v0.8.1 (stable) documentation

This Page

Backend: Base - celery.backends.base

celery.backends.base

class celery.backends.base.BaseBackend

The base backend class. All backends should inherit from this.

exception TimeoutError
The operation timed out.
BaseBackend.cleanup()
Backend cleanup. Is run by celery.task.DeleteExpiredTaskMetaTask.
BaseBackend.exception_to_python(exc)
Convert serialized exception to Python exception.
BaseBackend.get_result(task_id)
Get the result of a task.
BaseBackend.get_status(task_id)
Get the status of a task.
BaseBackend.get_traceback(task_id)
Get the traceback for a failed task.
BaseBackend.is_done(task_id)
Returns True if the task was successfully executed.
BaseBackend.mark_as_done(task_id, result)
Mark task as successfully executed.
BaseBackend.mark_as_failure(task_id, exc, traceback=None)
Mark task as executed with failure. Stores the execption.
BaseBackend.mark_as_retry(task_id, exc, traceback=None)
Mark task as being retries. Stores the current exception (if any).
BaseBackend.prepare_exception(exc)
Prepare exception for serialization.
BaseBackend.prepare_value(result)
Prepare value for storage.
BaseBackend.process_cleanup()

Cleanup actions to do at the end of a task worker process.

See celery.worker.jail().

BaseBackend.store_result(task_id, result, status)
Store the result and status of a task.
BaseBackend.wait_for(task_id, timeout=None)

Wait for task and return its result.

If the task raises an exception, this exception will be re-raised by wait_for().

If timeout is not None, this raises the celery.exceptions.TimeoutError exception if the operation takes longer than timeout seconds.