Update Redis lock to support Redis version < 5.0
Update the Redis lock connection intialization so that is works with Redis versions < 5.0. GitLab issue #709. Rob de Canha-Knight (@rssfed23) for the report and debug information. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -18,7 +18,8 @@ class RedisLock(LockingBackend):
|
||||
def get_redis_connection(cls):
|
||||
redis_url = setting_backend_arguments.value.get('redis_url', None)
|
||||
server = redis.from_url(url=redis_url)
|
||||
server.client_id()
|
||||
# Force to initialize the connection
|
||||
server.client()
|
||||
return server
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user