This document is for Celery's development version, which can be significantly different from previous releases. Get the stable docs here: 3.1.

Celery Application.

Proxies

celery.app.default_app = <Celery default:0x7f626d2f2d50>

Celery application.

Parameters:
  • main (str) – Name of the main module if running as __main__. This is used as the prefix for auto-generated task names.
  • broker (str) – URL of the default broker used.
  • loader (str, type) – The loader class, or the name of the loader class to use. Default is celery.loaders.app.AppLoader.
  • backend (str, type) – The result store backend class, or the name of the backend class to use. Default is the value of the result_backend setting.
  • amqp (str, type) – AMQP object or class name.
  • events (str, type) – Events object or class name.
  • log (str, type) – Log object or class name.
  • control (str, type) – Control object or class name.
  • set_as_current (bool) – Make this the global current app.
  • tasks (str, type) – A task registry or the name of a registry class.
  • include (List[str]) – List of modules every worker should import.
  • fixups (List[str]) – List of fix-up plug-ins (e.g., see celery.fixups.django).
  • autofinalize (bool) – If set to False a RuntimeError will be raised if the task registry or tasks are used before the app is finalized.
  • config_source (str, type) – receives a class with class level attributes that allows configurating Celery from a single object. All attributes described in the documentation can be defined.

Functions

celery.app.app_or_default(app=None)

Function returning the app provided or the default app if none.

The environment variable CELERY_TRACE_APP is used to trace app leaks. When enabled an exception is raised if there is no active app.

celery.app.enable_trace()[source]
celery.app.disable_trace()[source]