Skip to content

Commit

Permalink
Restores compatibility with django-redis >= 3.4.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
selwin committed Jan 10, 2014
1 parent ddee552 commit 4d7ad40
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion django_rq/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ def get_redis_connection(config):
# is a pluggable backend that return its Redis connection as
# its `client`
try:
return cache.client.client
# To get Redis connection on django-redis >= 3.4.0
# we need to use cache.client.get_client() instead of
# cache.client.client used in older versions
try:
return cache.client.get_client()
except AttributeError:
return cache.client.client
except NotImplementedError:
pass
else:
Expand Down

0 comments on commit 4d7ad40

Please sign in to comment.