Refactor healthcheck

This commit is contained in:
2022-02-12 13:38:36 +03:00
parent d93c16ffe8
commit 6b004002f1
3 changed files with 9 additions and 6 deletions

View File

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