app

Celery Application.

Package Contents

Functions

bugreport(app=None) Return information useful in bug reports.
shared_task(*args,**kwargs) Create shared task (decorator).
bugreport(app=None)

Return information useful in bug reports.

shared_task(*args, **kwargs)

Create shared task (decorator).

This can be used by library authors to create tasks that’ll work for any app environment.

Returns:
~celery.local.Proxy: A proxy that always takes the task from the current apps task registry.

Example:

>>> from celery import Celery, shared_task
>>> @shared_task
... def add(x, y):
...     return x + y
...
>>> app1 = Celery(broker='amqp://')
>>> add.app is app1
True
>>> app2 = Celery(broker='redis://')
>>> add.app is app2
True