Merge cluster to master #3
|
@ -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(
|
||||
|
|
|
@ -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')
|
||||
|
|
Reference in New Issue