mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-15 05:46:41 +03:00
Changed RedisLock blocking alogrythm, so it doesn't wait,
if sync takes a little more than sync period
This commit is contained in:
parent
b03b829ed9
commit
7034f165ac
|
@ -197,8 +197,9 @@ class RedisStorage(with_metaclass(SingletonMeta, Storage)):
|
|||
from .redis import RedisLock
|
||||
lock_key = self.REDIS_KEY_LOCK.format(import_key=import_key)
|
||||
lock_timeout = kwargs.get('lock_timeout', config.SYNC_DELAY * 10)
|
||||
self._locks[import_key] = RedisLock(self._redis, lock_key, timeout=lock_timeout, blocking_timeout=0.1,
|
||||
thread_local=False)
|
||||
blocking_timeout = kwargs.get('blocking_timeout', config.SYNC_DELAY)
|
||||
self._locks[import_key] = RedisLock(self._redis, lock_key, timeout=lock_timeout,
|
||||
blocking_timeout=blocking_timeout, thread_local=False)
|
||||
|
||||
return self._locks[import_key]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user