_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.

Module Contents

Classes

Functions

connect_on_app_finalize(callback)

Connect callback to be called when any app is finalized.

_announce_app_finalized(app)
_set_task_join_will_block(blocks)
task_join_will_block()
class _TLS
set_default_app(app)

Set default app.

_get_current_app()
_set_current_app(app)
get_current_app()

Return the current app.

get_current_app()
get_current_task()

Currently executing task.

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)

_register_app(app)
_deregister_app(app)
_get_active_apps()
_app_or_default(app=None)
_app_or_default_trace(app=None)
enable_trace()

Enable tracing of app instances.

disable_trace()

Disable tracing of app instances.