forked from mtusi2026/mtusi2026lab7
fix(operations): preserve response processing deadlines and await routed API readiness
This commit is contained in:
+7
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user