Keep production startup independent of benchmarks

This commit is contained in:
Codex
2026-08-15 11:13:29 -07:00
parent 174ba875dd
commit 74a5a252c8
3 changed files with 9 additions and 1 deletions
@@ -157,7 +157,8 @@ def inference_worker(loop: asyncio.AbstractEventLoop) -> None:
threshold = float(os.getenv("DETECTION_THRESHOLD", ".35")); max_people = int(os.getenv("MAX_PEOPLE", "4"))
try:
models.load()
run_offline_benchmark(models, threshold, max_people)
if os.getenv("RUN_STARTUP_BENCHMARK", "false").lower() == "true":
run_offline_benchmark(models, threshold, max_people)
state.models_ready = True; LOG.info("official detector and pose checkpoints loaded")
except Exception as exc:
state.inference_fault = True; state.error_code = "MODEL_LOAD_FAILED"