improve logs
This commit is contained in:
parent
dc71054e61
commit
966b912013
@ -125,6 +125,16 @@ The following is a coherent verbose detailed conversation between a girl named {
|
|||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
else:
|
else:
|
||||||
completion_lock.acquire()
|
completion_lock.acquire()
|
||||||
|
if await request.is_disconnected():
|
||||||
|
completion_lock.release()
|
||||||
|
requests_num = requests_num - 1
|
||||||
|
print(f"{request.client} Stop Waiting (Lock)")
|
||||||
|
quick_log(
|
||||||
|
request,
|
||||||
|
None,
|
||||||
|
"Stop Waiting (Lock). RequestsNum: " + str(requests_num),
|
||||||
|
)
|
||||||
|
return
|
||||||
set_rwkv_config(model, global_var.get(global_var.Model_Config))
|
set_rwkv_config(model, global_var.get(global_var.Model_Config))
|
||||||
set_rwkv_config(model, body)
|
set_rwkv_config(model, body)
|
||||||
if body.stream:
|
if body.stream:
|
||||||
@ -259,6 +269,16 @@ async def completions(body: CompletionBody, request: Request):
|
|||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
else:
|
else:
|
||||||
completion_lock.acquire()
|
completion_lock.acquire()
|
||||||
|
if await request.is_disconnected():
|
||||||
|
completion_lock.release()
|
||||||
|
requests_num = requests_num - 1
|
||||||
|
print(f"{request.client} Stop Waiting (Lock)")
|
||||||
|
quick_log(
|
||||||
|
request,
|
||||||
|
None,
|
||||||
|
"Stop Waiting (Lock). RequestsNum: " + str(requests_num),
|
||||||
|
)
|
||||||
|
return
|
||||||
set_rwkv_config(model, global_var.get(global_var.Model_Config))
|
set_rwkv_config(model, global_var.get(global_var.Model_Config))
|
||||||
set_rwkv_config(model, body)
|
set_rwkv_config(model, body)
|
||||||
if body.stream:
|
if body.stream:
|
||||||
|
Loading…
Reference in New Issue
Block a user