This commit is contained in:
parent
6be1e9acd3
commit
fb8bc05b4c
|
@ -151,6 +151,7 @@ def openai_chat_completions():
|
||||||
# The worker incremented it, we'll decrement it.
|
# The worker incremented it, we'll decrement it.
|
||||||
decrement_ip_count(handler.client_ip, 'processing_ips')
|
decrement_ip_count(handler.client_ip, 'processing_ips')
|
||||||
decr_active_workers(handler.selected_model, handler.backend_url)
|
decr_active_workers(handler.selected_model, handler.backend_url)
|
||||||
|
print('cleaned up')
|
||||||
|
|
||||||
return Response(generate(), mimetype='text/event-stream')
|
return Response(generate(), mimetype='text/event-stream')
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
|
@ -69,5 +69,5 @@ def need_to_wait(backend_url: str):
|
||||||
while active_workers >= concurrent_gens:
|
while active_workers >= concurrent_gens:
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
e = time.time()
|
e = time.time()
|
||||||
if e - s > 0.5:
|
if e - s > 0.1:
|
||||||
print(f'Worker was delayed {e - s} seconds.')
|
print(f'Worker was delayed {e - s} seconds.')
|
||||||
|
|
Reference in New Issue