Files
Sipro-Stocks/background/broker.py
2024-11-09 07:52:33 +03:00

12 lines
322 B
Python

from taskiq import TaskiqScheduler
from taskiq.schedule_sources import LabelScheduleSource
from taskiq_aio_pika import AioPikaBroker
import backend.config
taskiq_broker = AioPikaBroker(backend.config.RABBITMQ_URL)
scheduler = TaskiqScheduler(
broker=taskiq_broker,
sources=[LabelScheduleSource(taskiq_broker)]
)