Fix bug in healthcheck

This commit is contained in:
Joakim Hellsén 2026-04-09 19:14:12 +02:00
commit cba35edb19
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
2 changed files with 70 additions and 0 deletions

View file

@ -16,6 +16,7 @@ def healthcheck() -> None:
r: requests.Response = requests.get(url="http://localhost:5000", timeout=5)
if r.ok:
sys.exit(0)
sys.exit(1)
except requests.exceptions.RequestException as e:
print(f"Healthcheck failed: {e}", file=sys.stderr) # noqa: T201
sys.exit(1)