celery._state

    This module shouldn’t be used directly.

    celery._state.set_default_app(app)[源代码]

    celery._state.get_current_task()

    Currently executing task.

    Currently executing task, that was applied by the worker.

    This is used to differentiate between the actual task executed by the worker and any task that was called within a task (using task.__call__ or task.apply)