Merge cluster to master #3

Merged
cyberes merged 163 commits from cluster into master 2023-10-27 19:19:22 -06:00
2 changed files with 4 additions and 0 deletions
Showing only changes of commit 5540112607 - Show all commits

View File

@ -36,6 +36,8 @@ class RedisPriorityQueue:
print(f'Rejecting request from {item[1]} - {ip_count} requests in progress.')
return None # reject the request
print('--->', event.event_id)
self.redis.zadd('queue', {json.dumps((item, event.event_id, selected_model)): -priority})
self.increment_ip_count(item[1], 'queued_ip_count')
return event

View File

@ -33,6 +33,8 @@ def worker():
increment_ip_count(client_ip, 'processing_ips')
incr_active_workers(selected_model, backend_url)
print('<---', event_id.event_id)
if not request_json_body:
# This was a dummy request from the websocket handlers.
# We're going to let the websocket handler decrement