This commit is contained in:
Cyberes 2023-10-05 18:30:54 -06:00
parent 6be1e9acd3
commit fb8bc05b4c
2 changed files with 2 additions and 1 deletions

View File

@ -151,6 +151,7 @@ def openai_chat_completions():
# The worker incremented it, we'll decrement it.
decrement_ip_count(handler.client_ip, 'processing_ips')
decr_active_workers(handler.selected_model, handler.backend_url)
print('cleaned up')
return Response(generate(), mimetype='text/event-stream')
except Exception:

View File

@ -69,5 +69,5 @@ def need_to_wait(backend_url: str):
while active_workers >= concurrent_gens:
time.sleep(0.01)
e = time.time()
if e - s > 0.5:
if e - s > 0.1:
print(f'Worker was delayed {e - s} seconds.')