Skip to main content

shared_task

Create shared task (decorator).

This can be used by library authors to create tasks that'll work
for any app environment.
def shared_task(
*args: any,
**kwargs: any
) - > ~celery.local.Proxy

Create shared task (decorator). This can be used by library authors to create tasks that'll work for any app environment.

Parameters

NameTypeDescription
*argsanyPositional arguments passed to the task decorator, typically the function to be decorated.
**kwargsanyKeyword arguments used to configure task options such as name, retry behavior, or execution limits.

Returns

TypeDescription
~celery.local.ProxyA proxy that always takes the task from the current apps task registry.