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

# `celery.backends.base`

Result backend base classes.

- `BaseBackend` defines the interface.

- `KeyValueStoreBackend` is a common base class

    using K/V semantics like _get and _put.

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

  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)

  Dummy result backend.

  as_uri(*args, **kwargs)

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

  ensure_chords_allowed()
  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)

    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)

  Result backend base class for key/value stores.