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:
21
21
# broker.py
22
22
import asyncio
23
23
24
- from taskiq_redis import ListQueueBroker, RedisAsyncResultBackend
24
+ from taskiq_redis import RedisAsyncResultBackend, RedisStreamBroker
25
25
26
- redis_async_result = RedisAsyncResultBackend(
26
+ result_backend = RedisAsyncResultBackend(
27
27
redis_url = " redis://localhost:6379" ,
28
28
)
29
29
30
30
# Or you can use PubSubBroker if you need broadcasting
31
- broker = ListQueueBroker(
31
+ # Or ListQueueBroker if you don't want acknowledges
32
+ broker = RedisStreamBroker(
32
33
url = " redis://localhost:6379" ,
33
- result_backend = redis_async_result,
34
- )
34
+ ).with_result_backend(result_backend)
35
35
36
36
37
37
@broker.task
You can’t perform that action at this time.
0 commit comments