From 67173f30ddfa6be1add9e8fe065fc9a05cb9bff6 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Thu, 5 Oct 2023 19:35:12 -0600 Subject: [PATCH] t --- llm_server/routes/queue.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llm_server/routes/queue.py b/llm_server/routes/queue.py index c8cf2e6..f6e7993 100644 --- a/llm_server/routes/queue.py +++ b/llm_server/routes/queue.py @@ -59,10 +59,12 @@ class RedisPriorityQueue: print(item.decode('utf-8')) def increment_ip_count(self, client_ip: str, redis_key): - self.redis.hincrby(redis_key, client_ip, 1) + new_count = self.redis.hincrby(redis_key, client_ip, 1) + print(client_ip, new_count) def decrement_ip_count(self, client_ip: str, redis_key): new_count = self.redis.hincrby(redis_key, client_ip, -1) + print(client_ip, new_count) if new_count <= 0: self.redis.hdel(redis_key, client_ip)