Files
library_updater/scripts/healthcheck.py
2022-02-05 11:48:30 +03:00

12 lines
244 B
Python

import os
import httpx
response = httpx.get(
"http://localhost:8080/healthcheck",
headers={"Authorization": os.environ["API_KEY"]},
)
print(f"HEALTHCHECK STATUS: {response.status_code}")
exit(0 if response.status_code == 200 else 1)