lab6 done

This commit is contained in:
Khakimov Dmitrij
2026-11-18 21:37:25 +03:00
parent 470d9d6f1e
commit 4ab9b0ef9a
158 changed files with 21115 additions and 52 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env python3
"""Wait for the local gateway without disclosing application configuration."""
import argparse
import time
import urllib.request
p=argparse.ArgumentParser();p.add_argument('--base-url',default='http://localhost:18086');args=p.parse_args()
deadline=time.monotonic()+120
while time.monotonic()<deadline:
try:
with urllib.request.urlopen(args.base_url+'/health/ready',timeout=3) as response:
if response.status==200:
print('API is ready');break
except Exception:
pass
time.sleep(1)
else:
raise SystemExit('API did not become ready within 120 seconds')