Files
mtusi2026lab2/scripts/wait_ready.py
T
temp1lar 76f0b45143
Skeleton contracts / contracts (pull_request) Canceled after 0s
lab2done
2026-11-13 11:08:23 +03:00

10 lines
338 B
Python

#!/usr/bin/env python3
import time, urllib.request
for attempt in range(90):
try:
with urllib.request.urlopen('http://127.0.0.1:8080/health/ready',timeout=4) as r:
if r.status==200: print('Ready'); break
except (OSError, TimeoutError): pass
time.sleep(1)
else: raise SystemExit('API did not become ready')