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 2 additions and 2 deletions
Showing only changes of commit 7cb624c5f5 - Show all commits

View File

@ -112,7 +112,7 @@ class RedisCustom(Redis):
def zcard(self, name: KeyT):
return self.redis.zcard(self._key(name))
def hdel(self, name: str, *keys: List):
def hdel(self, name: str, *keys: str):
return self.redis.hdel(self._key(name), *keys)
def hget(

View File

@ -62,7 +62,7 @@ class RedisPriorityQueue:
def decrement_ip_count(self, client_ip: str, redis_key):
new_count = self.redis.hincrby(redis_key, client_ip, -1)
if new_count <= 0:
self.redis.hdel(redis_key, [client_ip])
self.redis.hdel(redis_key, client_ip)
def __len__(self):
return self.redis.zcard('queue')