Spaces:
Sleeping
Sleeping
Commit ·
3e93f39
1
Parent(s): e3becbb
Bump version to 2.1.0, add version+IST time to /health for deploy verification
Browse files- app/main.py +3 -2
app/main.py
CHANGED
|
@@ -64,13 +64,14 @@ except Exception as e:
|
|
| 64 |
import logging
|
| 65 |
logging.getLogger("uvicorn.error").warning("Startup migration skipped: %s", e)
|
| 66 |
|
| 67 |
-
app = FastAPI(title="AI Change Detection", version="2.
|
| 68 |
|
| 69 |
|
| 70 |
@app.get("/health")
|
| 71 |
def health():
|
| 72 |
"""Lightweight health check so Hugging Face can mark the Space as running quickly."""
|
| 73 |
-
|
|
|
|
| 74 |
|
| 75 |
# Mount static files
|
| 76 |
STATIC_DIR = Path(__file__).resolve().parent.parent / "static"
|
|
|
|
| 64 |
import logging
|
| 65 |
logging.getLogger("uvicorn.error").warning("Startup migration skipped: %s", e)
|
| 66 |
|
| 67 |
+
app = FastAPI(title="AI Change Detection", version="2.1.0")
|
| 68 |
|
| 69 |
|
| 70 |
@app.get("/health")
|
| 71 |
def health():
|
| 72 |
"""Lightweight health check so Hugging Face can mark the Space as running quickly."""
|
| 73 |
+
from datetime import datetime
|
| 74 |
+
return {"status": "ok", "version": "2.1.0", "server_time_ist": _isoformat_ist(datetime.now(timezone.utc))}
|
| 75 |
|
| 76 |
# Mount static files
|
| 77 |
STATIC_DIR = Path(__file__).resolve().parent.parent / "static"
|