fix(operations): preserve response processing deadlines and await routed API readiness

This commit is contained in:
2026-11-22 20:04:24 +03:00
parent f77223790d
commit 7e61bc4ee3
5 changed files with 266 additions and 3 deletions
+7 -1
View File
@@ -106,7 +106,13 @@ def ready(base=BASE, *, timeout=30):
while time.monotonic() < end:
try:
if client.get("/health/ready").status_code == 200:
return
# HAProxy's business and health backends recover separately.
# Check a harmless unauthenticated business route as well.
routed = client.get("/api/v1/users/me")
if routed.status_code == 401 and routed.headers.get(
"x-instance-id"
):
return
except httpx.HTTPError:
pass
time.sleep(0.2)