Redis Lock Backend - 'Redis' object has no attribute 'client'
Follow on from #709 (closed)
Initially before 3.3.6 was out I solved the issue locally by upgrading to Redis 5 as per the comments in that issue.
However, upon upgrading to 3.3.6 with the same Redis 5 instance the Redis locking backend is broken with another error. I think this relates to changing it to .client() in redis_lock.py, as when I change the line in /opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/lock_manager/backends/redis_lock.py back to "server.client_id()" it works again.
Traceback (most recent call last):
File "/opt/mayan-edms/local/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/mayan-edms/local/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
return self.run(*args, **kwargs)
File "/opt/mayan-edms/local/lib/python3.7/site-packages/mayan/apps/sources/tasks.py", line 33, in task_check_interval_source
lock = locking_backend.acquire_lock(lock_id, DEFAULT_SOURCE_LOCK_EXPIRE)
File "/opt/mayan-edms/local/lib/python3.7/site-packages/mayan/apps/lock_manager/backends/redis_lock.py", line 15, in acquire_lock
return RedisLock(name=name, timeout=timeout)
File "/opt/mayan-edms/local/lib/python3.7/site-packages/mayan/apps/lock_manager/backends/redis_lock.py", line 31, in __init__
redis_lock_instance = self.get_redis_connection().lock(
File "/opt/mayan-edms/local/lib/python3.7/site-packages/mayan/apps/lock_manager/backends/redis_lock.py", line 22, in get_redis_connection
server.client()
AttributeError: 'Redis' object has no attribute 'client'```