ЛР 5: outbox, retry и versioned pipeline — Майорова БВТ2301

This commit is contained in:
2026-10-27 18:20:39 +03:00
parent 276dbdad8a
commit 55a41e17c9
64 changed files with 10106 additions and 45 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')