From 887d9d0536fbc5e8b530ea080c90b9eef69b7c6f Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Tue, 14 Jan 2025 13:57:09 -0500 Subject: [PATCH] add healthcheck route Signed-off-by: Xe Iaso --- fly.toml | 1 + waifuwave.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/fly.toml b/fly.toml index 43a0395..b492db3 100644 --- a/fly.toml +++ b/fly.toml @@ -8,6 +8,7 @@ primary_region = 'ord' vm.size = "l40s" [build] +image = "reg.xeiaso.net/xeserv/waifuwave:latest" [http_service] internal_port = 8080 diff --git a/waifuwave.py b/waifuwave.py index 7e1afb5..0a4abbd 100644 --- a/waifuwave.py +++ b/waifuwave.py @@ -273,6 +273,11 @@ def read_root(): return jsonify({"Hello": "World"}) +@app.route("/health-check", methods=["GET"]) +def health_check(): + return jsonify({"status": "READY"}) + + @app.route("/generate", methods=["POST"]) def generate(): content_type = request.headers.get('Content-Type')