INNER CODE UNIT · Python
live
shenmintao/marginalia · src/marginalia/main.py:341
async def live() -> dict[str, str]:
"""Process liveness only; never depends on downstream services."""
return {"status": "ok", "version": __version__}
async def _bounded_readiness(check, timeout_seconds: float) -> str: # noqa: ANN001
try:
await asyncio.wait_for(check, timeout=timeout_seconds)
except Exception:
return "error"
return "ok"
async def _database_ready() -> None:
async with get_engine().connect() as connection:
await connection.execute(text("SELECT 1"))