File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ Let's see the example with the redis broker and redis async result:
2121# broker.py
2222import asyncio
2323
24- from taskiq_redis import ListQueueBroker, RedisAsyncResultBackend
24+ from taskiq_redis import RedisAsyncResultBackend, RedisStreamBroker
2525
26- redis_async_result = RedisAsyncResultBackend(
26+ result_backend = RedisAsyncResultBackend(
2727 redis_url = " redis://localhost:6379" ,
2828)
2929
3030# Or you can use PubSubBroker if you need broadcasting
31- broker = ListQueueBroker(
31+ # Or ListQueueBroker if you don't want acknowledges
32+ broker = RedisStreamBroker(
3233 url = " redis://localhost:6379" ,
33- result_backend = redis_async_result,
34- )
34+ ).with_result_backend(result_backend)
3535
3636
3737@broker.task
You can’t perform that action at this time.
0 commit comments