Skip to content

Do not set url for BaseRedisBroker #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion taskiq_redis/redis_broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BaseRedisBroker(AsyncBroker):

def __init__(
self,
url: Optional[str] = None,
url: str,
task_id_generator: Optional[Callable[[], str]] = None,
result_backend: Optional[AsyncResultBackend[_T]] = None,
queue_name: str = "taskiq",
Expand Down
6 changes: 6 additions & 0 deletions tests/test_broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
from taskiq_redis import ListQueueBroker, PubSubBroker


def test_no_url_should_raise_typeerror() -> None:
"""Test that url is expected."""
with pytest.raises(TypeError):
ListQueueBroker() # type: ignore


async def get_message( # type: ignore
broker: AsyncBroker,
) -> Union[bytes, AckableMessage]:
Expand Down