Skip to content

Commit

Permalink
Change logic for max_connection in redis if set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
awmackowiak committed Jun 12, 2023
1 parent 784981a commit 063bd57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions celery/backends/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ def __init__(self, host=None, port=None, db=None, password=None,

if max_connections is not None:
self.max_connections = max_connections
elif _get('redis_max_connections') is not None:
self.max_connections = _get('redis_max_connections')
else:
self.max_connections = (
_get('redis_max_connections') or
self.max_connections)
self.max_connections = self.max_connections
self._ConnectionPool = connection_pool

socket_timeout = _get('redis_socket_timeout')
Expand Down

0 comments on commit 063bd57

Please sign in to comment.