github-actions[bot] commited on
Commit ·
61e83f9
1
Parent(s): 0481220
Automated Deploy: cbfb339c9781fec7a5ae1dc9c698f4d61b528a97
Browse files
app.py
CHANGED
|
@@ -27,6 +27,17 @@ app.include_router(segmentation.router)
|
|
| 27 |
app.include_router(floor_direction.router)
|
| 28 |
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
@app.on_event("startup")
|
| 31 |
def startup_warm_start_models():
|
| 32 |
warm_start_models()
|
|
|
|
| 27 |
app.include_router(floor_direction.router)
|
| 28 |
|
| 29 |
|
| 30 |
+
@app.get("/health")
|
| 31 |
+
def health():
|
| 32 |
+
"""Readiness probe for deploy automation.
|
| 33 |
+
|
| 34 |
+
Model warm-start runs as a startup event, so uvicorn does not accept
|
| 35 |
+
connections until it finishes. A 200 here therefore means "serving",
|
| 36 |
+
not merely "container started".
|
| 37 |
+
"""
|
| 38 |
+
return {"ok": True}
|
| 39 |
+
|
| 40 |
+
|
| 41 |
@app.on_event("startup")
|
| 42 |
def startup_warm_start_models():
|
| 43 |
warm_start_models()
|