feat(ocr): flip ocr_models_ready to 1 once the lifespan startup finishes
Mirrors the existing _models_ready bool so Prometheus has a time-series liveness/readiness signal for future alerting rules (e.g. ocr_models_ready < 1 for 2m). Refs #652 (AC7) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,7 @@ async def lifespan(app: FastAPI):
|
||||
kraken_engine.load_models()
|
||||
load_spell_checker()
|
||||
_models_ready = True
|
||||
metrics.ocr_models_ready.set(1)
|
||||
logger.info("Startup complete — ready to accept requests")
|
||||
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user