diff options
-rw-r--r-- | setup.cfg | 4 | ||||
-rw-r--r-- | src/apscheduler/eventbrokers/redis.py | 6 |
2 files changed, 4 insertions, 6 deletions
@@ -37,7 +37,7 @@ asyncpg = asyncpg >= 0.20 cbor = cbor2 >= 5.0 mongodb = pymongo >= 3.12 mqtt = paho-mqtt >= 1.5 -redis = redis >= 3.5 +redis = redis >= 4.0 sqlalchemy = sqlalchemy >= 1.4.22 test = asyncpg >= 0.20 @@ -53,7 +53,7 @@ test = pytest-freezegun pytest-lazy-fixture pytest-mock - redis >= 3.5 + redis[hiredis] >= 4.0 sqlalchemy >= 1.4.22 trio doc = diff --git a/src/apscheduler/eventbrokers/redis.py b/src/apscheduler/eventbrokers/redis.py index eae5678..5211181 100644 --- a/src/apscheduler/eventbrokers/redis.py +++ b/src/apscheduler/eventbrokers/redis.py @@ -2,7 +2,6 @@ from __future__ import annotations from concurrent.futures import Future from threading import Thread -from typing import Optional import attrs from redis import ConnectionPool, Redis @@ -26,9 +25,8 @@ class RedisEventBroker(LocalEventBroker, DistributedEventBrokerMixin): _ready_future: Future[None] = attrs.field(init=False) @classmethod - def from_url(cls, url: str, db: Optional[str] = None, decode_components: bool = False, - **kwargs) -> RedisEventBroker: - pool = ConnectionPool.from_url(url, db, decode_components, **kwargs) + def from_url(cls, url: str, **kwargs) -> RedisEventBroker: + pool = ConnectionPool.from_url(url, **kwargs) client = Redis(connection_pool=pool) return cls(client) |