Module

app.lifecycle

ASGI lifespan and worker lifecycle coordination.

Classes

LifecycleCoordinator 4
Owns lifespan and worker startup/shutdown behavior.

Owns lifespan and worker startup/shutdown behavior.

Methods

handle_lifespan 3
async
async def handle_lifespan(self, scope: Scope, receive: Receive, send: Send) -> None
Parameters
Name Type Description
scope
receive
send
handle_worker_startup 0
async
async def handle_worker_startup(self) -> None
handle_worker_shutdown 0
async
async def handle_worker_shutdown(self) -> None
Internal Methods 1
__init__ 3
def __init__(self, config: AppConfig, state: MutableAppState, ensure_frozen: Callable[[], None]) -> None
Parameters
Name Type Description
config
state
ensure_frozen