Can't get fake connection when using `USE_REDIS_CACHE`
RealOrangeOne opened this issue · comments
Describe the bug
When using django-rq
, configured using USE_REDIS_CACHE
to point to a cache configuration for Redis, it's not possible to get a fake connection, as it expects either an explicitly configured HOST
etc, or URL
variables.
See the upstream implementation. Notably, this should probably also handle both USE_REDIS_CACHE
and UNIX_SOCKET_PATH
To Reproduce
Steps to reproduce the behavior:
- Configure
django-rq
usingUSE_REDIS_CACHE
- Attempt to use
get_fake_connection
Expected behavior
I get a fake Redis connection
Can you share a stacktrace? it is not clear the cause of the issue.
the from_url
method does not require host/post. In the link you provided in django-rq, it uses from_url.
Perhaps the issue is in django_redis package, I see there is from django_redis import get_redis_connection as get_redis
Closing this. Please reopen with more details