你正在阅读 Celery 3.1 的文档。开发版本文档见:
此处.
celery._state
This is an internal module containing thread state
like the current_app, and current_task.
This module shouldn’t be used directly.
-
celery._state.set_default_app(app)[源代码]
-
celery._state.get_current_app()[源代码]
-
celery._state.get_current_task()[源代码]
Currently executing task.
-
celery._state.get_current_worker_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)