worked poc

This commit is contained in:
Mateusz Gruszczyński
2026-08-14 11:33:01 +02:00
parent adfdb0b86c
commit fc3a2944b2
94 changed files with 2931 additions and 3412 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
#!/usr/bin/env python3
import json
import os
import sys
import urllib.request
try:
with urllib.request.urlopen("http://127.0.0.1:8080/api/status", timeout=3) as response:
port = int(os.getenv("WEB_PORT", "8080"))
with urllib.request.urlopen(f"http://127.0.0.1:{port}/api/status", timeout=3) as response:
data = json.load(response)
raise SystemExit(0 if data.get("operational") else 1)
except Exception as exc: