comms: tolerate MAS login rate limits
This commit is contained in:
parent
976b5994dd
commit
88a4e93194
@ -235,8 +235,11 @@ spec:
|
|||||||
},
|
},
|
||||||
timeout=30,
|
timeout=30,
|
||||||
)
|
)
|
||||||
|
if r.status_code == 429:
|
||||||
|
return False
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
raise RuntimeError(f"login failed for {username}: {r.status_code} {r.text}")
|
raise RuntimeError(f"login failed for {username}: {r.status_code} {r.text}")
|
||||||
|
return True
|
||||||
|
|
||||||
wait_for_service(MAS_ADMIN_API_BASE)
|
wait_for_service(MAS_ADMIN_API_BASE)
|
||||||
token = admin_token()
|
token = admin_token()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user