forked from mtusi2026/mtusi2026lab4
lab4
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import os
|
||||
import urllib.request
|
||||
|
||||
|
||||
host = "127.0.0.1"
|
||||
port = os.getenv("APP_PORT", "8080")
|
||||
with urllib.request.urlopen(f"http://{host}:{port}/health/ready", timeout=2) as response:
|
||||
payload = json.load(response)
|
||||
if response.status != 200 or payload != {"status": "ok"}:
|
||||
raise SystemExit(1)
|
||||
Reference in New Issue
Block a user