This document describes the current stable version of Celery (5.4). For development docs, go here.

celery.backends.base

Result backend base classes.

class celery.backends.base.BaseBackend(app, serializer=None, max_cached_results=None, accept=None, expires=None, expires_type=None, url=None, **kwargs)[source]

Base (synchronous) result backend.

class celery.backends.base.DisabledBackend(app, serializer=None, max_cached_results=None, accept=None, expires=None, expires_type=None, url=None, **kwargs)[source]

Dummy result backend.

as_uri(*args, **kwargs)[source]

Return the backend as an URI, sanitizing the password or not.

ensure_chords_allowed()[source]
get_many(*args, **kwargs)
get_result(*args, **kwargs)

Get the result of a task.

get_state(*args, **kwargs)

Get the state of a task.

get_status(*args, **kwargs)

Get the state of a task.

get_task_meta_for(*args, **kwargs)
get_traceback(*args, **kwargs)

Get the traceback for a failed task.

store_result(*args, **kwargs)[source]

Update task state and result.

if always_retry_backend_operation is activated, in the event of a recoverable exception, then retry operation with an exponential backoff until a limit has been reached.

wait_for(*args, **kwargs)

Wait for task and return its result.

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

Raises:

celery.exceptions.TimeoutError – If timeout is not None, and the operation takes longer than timeout seconds.

class celery.backends.base.KeyValueStoreBackend(*args, **kwargs)[source]

Result backend base class for key/value stores.