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)