From 778c48d11de28b5fb086dc94c700414dc7e7eb6c Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 16 Dec 2019 04:20:17 -0400 Subject: [PATCH] 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 --- HISTORY.rst | 3 +++ mayan/apps/lock_manager/backends/redis_lock.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index fc5a219d7e..7fcee34a93 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,9 @@ Thanks to O2 Graphics (@O2Graphics). - Fix document orientaton detection. GitLab issue #713. Thanks to Rob de Canha-Knight (@rssfed23) for the report and debug information. +- 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. 3.3.5 (2019-12-13) ================== diff --git a/mayan/apps/lock_manager/backends/redis_lock.py b/mayan/apps/lock_manager/backends/redis_lock.py index 2527abf1c7..2010dd8595 100644 --- a/mayan/apps/lock_manager/backends/redis_lock.py +++ b/mayan/apps/lock_manager/backends/redis_lock.py @@ -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