Merge branch 'feat/test-coverage'

This commit is contained in:
dom
2026-03-08 12:44:27 +01:00
5 changed files with 1455 additions and 0 deletions

View File

@@ -629,4 +629,21 @@ def create_app() -> Flask:
metrics=metrics, total_selection=len(selection),
groups=groups)
# --- Health check endpoint ---
@app.route("/health")
def health():
from datetime import datetime, timezone
ollama_ok = False
try:
r = requests.get(f"{OLLAMA_URL}/api/tags", timeout=2)
ollama_ok = r.status_code == 200
except Exception:
pass
return jsonify({
"status": "ok",
"version": "2.1.0",
"ollama": ollama_ok,
"timestamp": datetime.now(timezone.utc).isoformat(),
})
return app