Skip to content

Commit d89ad5c

Browse files
committed
Allow protocol to be set in RedisSettings
This requires at least redis 5.0.0 version
1 parent 2f752e2 commit d89ad5c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

arq/connections.py

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class RedisSettings:
4545
conn_retries: int = 5
4646
conn_retry_delay: int = 1
4747
max_connections: Optional[int] = None
48+
protocol: Optional[int] = 2
4849

4950
sentinel: bool = False
5051
sentinel_master: str = 'mymaster'
@@ -266,6 +267,7 @@ def pool_factory(*args: Any, **kwargs: Any) -> ArqRedis:
266267
retry_on_timeout=settings.retry_on_timeout,
267268
retry_on_error=settings.retry_on_error,
268269
max_connections=settings.max_connections,
270+
protocol=settings.protocol,
269271
)
270272

271273
while True:

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ classifiers = [
3838
]
3939
requires-python = '>=3.8'
4040
dependencies = [
41-
'redis[hiredis]>=4.2.0,<6',
41+
'redis[hiredis]>=5.0.0,<6',
4242
'click>=8.0',
4343
]
4444
optional-dependencies = {watch = ['watchfiles>=0.16'] }

0 commit comments

Comments
 (0)