mirror of
https://github.com/Viren070/MediaFusion.git
synced 2025-12-01 23:21:11 +01:00
12 lines
348 B
Python
12 lines
348 B
Python
# Desc: Setup the dramatiq broker and middleware.
|
|
import dramatiq
|
|
from dramatiq.brokers.redis import RedisBroker
|
|
from dramatiq.middleware import AsyncIO
|
|
|
|
from db.config import settings
|
|
|
|
# Setup the broker and the middleware
|
|
redis_broker = RedisBroker(url=settings.redis_url)
|
|
redis_broker.add_middleware(AsyncIO())
|
|
dramatiq.set_broker(redis_broker)
|