INNER CODE UNIT · Python
lifespan
mikel-brostrom/boxmot · boxmot/engine/service/app.py:53
async def lifespan(_: FastAPI) -> AsyncIterator[None]:
yield
await manager.close()
application = FastAPI(
title="BoxMOT Tracker Service",
version="1.0.0",
description="Stateful multi-object tracking from externally supplied detections.",
lifespan=lifespan,
)
application.state.tracker_manager = manager
@application.get("/healthz")
async def health() -> dict[str, str]:
return {"status": "ok"}
@application.get("/readyz", response_model=ReadinessResponse)
async def readiness() -> ReadinessResponse: