From e65950fe97eb1e670fd05f42ccd33d5ca8a3d904 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 3 Oct 2023 17:16:22 +0200 Subject: [PATCH] feat(api): service assist stats - health check --- assist-stats/main.py | 5 +++++ assist-stats/run.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assist-stats/main.py b/assist-stats/main.py index 8dbf940b4..8db757d10 100644 --- a/assist-stats/main.py +++ b/assist-stats/main.py @@ -153,3 +153,8 @@ def create_event(event: EventCreate, db: Session = Depends(get_db)): update_duration(event.event_id, event.timestamp, db) else: insert_event(event, db) + + +@app.get("/", tags=["health"]) +def health_check(): + return {"status": "ok"} diff --git a/assist-stats/run.py b/assist-stats/run.py index 7f2c752d9..2e3ae7baf 100644 --- a/assist-stats/run.py +++ b/assist-stats/run.py @@ -2,4 +2,4 @@ import uvicorn from decouple import config if __name__ == "__main__": - uvicorn.run("main:app", host="0.0.0.0", port=8080, reload=True) + uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)