Fix in counter

This commit is contained in:
M1ha 2019-01-18 18:01:18 +05:00
parent 9bc6c6154b
commit d8dccf209d

View File

@ -233,11 +233,10 @@ class RedisStorage(Storage):
else:
batch_size = 0
self.post_batch_removed(import_key, batch_size)
# unblock lock after sync completed
lock_pid_key = self.REDIS_KEY_LOCK_PID.format(import_key=import_key)
self._redis.delete(lock_pid_key)
self.post_batch_removed(import_key, batch_size)
self.get_lock(import_key, **kwargs).release()
logger.info('django-clickhouse: synced %d items (key: %s)' % (batch_size, import_key))