import threading
from typing import Any

def connect_on_app_finalize(callback: Any): ...

class _TLS(threading.local):
    current_app: Any = ...

def set_default_app(app: Any) -> None: ...
def get_current_app() -> None: ...

get_current_app: Any

def get_current_task(): ...
def get_current_worker_task(): ...

current_app: Any
current_task: Any
