mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Add on_stream_state_change retries
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from taskiq import TaskiqScheduler
|
||||
from taskiq.middlewares.retry_middleware import SimpleRetryMiddleware
|
||||
from taskiq.schedule_sources import LabelScheduleSource
|
||||
from taskiq_redis import ListQueueBroker, RedisAsyncResultBackend
|
||||
|
||||
@@ -6,6 +7,9 @@ from core.config import config
|
||||
|
||||
|
||||
broker = ListQueueBroker(url=config.REDIS_URI) \
|
||||
.with_middlewares(
|
||||
SimpleRetryMiddleware(default_retry_count=5)
|
||||
) \
|
||||
.with_result_backend(RedisAsyncResultBackend(
|
||||
redis_url=config.REDIS_URI,
|
||||
result_ex_time=60 * 60 * 24 * 7,
|
||||
|
||||
Reference in New Issue
Block a user