Skip to content

Commit e28442e

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

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
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] = None
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'] }

requirements/pyproject.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ hiredis==2.3.2
1212
# via redis
1313
idna==3.7
1414
# via anyio
15-
redis==4.6.0
15+
redis==5.0.8
1616
# via arq (pyproject.toml)
1717
sniffio==1.3.1
1818
# via anyio

0 commit comments

Comments
 (0)