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

# `celery.backends.asynchronous`

Async I/O backend support utilities.

class celery.backends.asynchronous.AsyncBackendMixin

  Mixin for backends that enables the async API.

  add_pending_result(result, weak=False, start_drainer=True)
  add_pending_results(results, weak=False)
  property is_async
  iter_native(result, no_ack=True, **kwargs)
  on_result_fulfilled(result)
  remove_pending_result(result)
  wait_for_pending(result, callback=None, propagate=True, **kwargs)

class celery.backends.asynchronous.BaseResultConsumer(backend, app, accept, pending_results, pending_messages)

  Manager responsible for consuming result messages.

  cancel_for(task_id)
  consume_from(task_id)
  drain_events(timeout=None)
  drain_events_until(p, timeout=None, on_interval=None)
  on_after_fork()
  on_out_of_band_result(message)
  on_state_change(meta, message)
  on_wait_for_pending(result, timeout=None, **kwargs)
  start(initial_task_id, **kwargs)
  stop()

class celery.backends.asynchronous.Drainer(result_consumer)

  Result draining service.

  drain_events_until(p, timeout=None, interval=1, on_interval=None, wait=None)
  start()
  stop()
  wait_for(p, wait, timeout=None)

celery.backends.asynchronous.register_drainer(name)

  Decorator used to register a new result drainer type.