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

# `celery.backends.elasticsearch`

Elasticsearch result store backend.

class celery.backends.elasticsearch.ElasticsearchBackend(url=None, *args, **kwargs)

  Elasticsearch Backend.

  Raises:

    celery.exceptions.ImproperlyConfigured – if module https://pypi.org/project/elasticsearch/ is not available.

  decode(payload)
  delete(key)
  doc_type = None
  encode(data)
  es_max_retries = 3
  es_retry_on_timeout = False
  es_timeout = 10
  exception_safe_to_retry(exc)

    Check if an exception is safe to retry.

    Backends have to overload this method with correct predicates dealing with their exceptions.

    By default no exception is safe to retry, it’s up to backend implementation to define which exceptions are safe.

  get(key)
  host = 'localhost'
  index = 'celery'
  mget(keys)
  password = None
  port = 9200
  scheme = 'http'
  property server
  set(key, value)
  username = None