mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-13 12:10:18 +00:00
updated server test to handle 503 HTML
This commit is contained in:
parent
9d3424a3c1
commit
5ca179c899
@ -1208,7 +1208,10 @@ async def wait_for_slots_status(context,
|
|||||||
while True:
|
while True:
|
||||||
async with await session.get(f'{base_url}/slots', params=params) as slots_response:
|
async with await session.get(f'{base_url}/slots', params=params) as slots_response:
|
||||||
status_code = slots_response.status
|
status_code = slots_response.status
|
||||||
slots = await slots_response.json()
|
try:
|
||||||
|
slots = await slots_response.json()
|
||||||
|
except:
|
||||||
|
slots = await slots_response.text()
|
||||||
if context.debug:
|
if context.debug:
|
||||||
print(f"slots responses {slots}\n")
|
print(f"slots responses {slots}\n")
|
||||||
if status_code == 503 and status_code == expected_http_status_code:
|
if status_code == 503 and status_code == expected_http_status_code:
|
||||||
|
Loading…
Reference in New Issue
Block a user