mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-22 00:56:37 +03:00
Bug fix with rank
This commit is contained in:
parent
95bf0ab520
commit
578fc6c939
|
@ -223,9 +223,9 @@ class RedisStorage(Storage):
|
|||
rank_key = self.REDIS_KEY_RANK_TEMPLATE.format(import_key=import_key)
|
||||
ops_key = self.REDIS_KEY_OPS_TEMPLATE.format(import_key=import_key)
|
||||
|
||||
top_rank = int(self._redis.get(rank_key))
|
||||
top_rank = self._redis.get(rank_key)
|
||||
if top_rank:
|
||||
res = self._redis.zremrangebyrank(ops_key, 0, top_rank)
|
||||
res = self._redis.zremrangebyrank(ops_key, 0, int(top_rank))
|
||||
batch_size = int(res)
|
||||
else:
|
||||
batch_size = 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user