This document describes the current stable version of Celery (4.2). For development docs, go here.
celery._state
¶
Internal 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.
get_current_worker_task
()[source]¶ 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__
ortask.apply
)
-
celery._state.
current_app
= <Celery default>¶ Proxy to current app.
-
celery._state.
current_task
= None¶ Proxy to current task.