lavkach3
1import taskiq_fastapi2from taskiq import InMemoryBroker3#from taskiq_nats import NatsBroker
4from taskiq_redis import RedisAsyncResultBackend5
6#from fastapi_app.settings import settings
7
8# broker = NatsBroker(
9# settings.nats_urls.split(","),
10# queue="fastapi_app_queue",
11# ).with_result_backend(
12# RedisAsyncResultBackend(settings.redis_url),
13# )
14#
15# # Actually, you can remove this line and test agains real
16# # broker. Which is more preferable in some cases.
17
18broker = InMemoryBroker()19
20
21taskiq_fastapi.init(broker, "app.front.front_server:app")