docs: add warning of `decode_responses` (#1833)

This commit is contained in:
lowercase00 2023-02-25 21:53:25 -03:00 committed by GitHub
parent 2c6c7ae586
commit 7bbef7e05a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -162,3 +162,17 @@ q = Queue(connection=conn)
Setting a `socket_timeout` with a lower value than the `default_worker_ttl` will cause a `TimeoutError`
since it will interrupt the worker while it gets new jobs from the queue.
### Encoding / Decoding
The encoding and decoding of Redis objects occur in multiple locations within the codebase,
which means that the `decode_responses=True` argument of the Redis connection is not currently supported.
```python
from redis import Redis
from rq import Queue
conn = Redis(..., decode_responses=True) # This is not supported
q = Queue(connection=conn)
```