ЛР 3 — БВТ2301 — Майорова — на 5

This commit is contained in:
2026-10-27 11:26:09 +03:00
parent 0ab3a341aa
commit 8da1770331
55 changed files with 64041 additions and 35 deletions
+16
View File
@@ -0,0 +1,16 @@
import os
import time
import urllib.request
base = os.environ.get('BASE_URL', 'http://127.0.0.1:18087')
for attempt in range(120):
try:
with urllib.request.urlopen(base + '/health/ready', timeout=2) as response:
if response.status == 200:
print('Ready through load balancer.')
break
except OSError:
pass
time.sleep(0.5)
else:
raise SystemExit('Readiness timeout')