parent
e6d214c955
commit
986d20bcad
2 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
import logging
|
||||
|
||||
from redis import ConnectionError
|
||||
from redis import RedisError
|
||||
from redlock import RedLock, RedLockError
|
||||
|
||||
from app import app
|
||||
|
@ -37,8 +37,8 @@ class GlobalLock(object):
|
|||
except RedLockError:
|
||||
logger.debug('Could not acquire lock %s', self._lock_name)
|
||||
return False
|
||||
except ConnectionError as ce:
|
||||
logger.debug('Could not connect to Redis for lock %s: %s', self._lock_name, ce)
|
||||
except RedisError as re:
|
||||
logger.debug('Could not connect to Redis for lock %s: %s', self._lock_name, re)
|
||||
return False
|
||||
|
||||
|
||||
|
|
Reference in a new issue