From 7bc173f6e9534482421ea6d30f2a63074a10a2f3 Mon Sep 17 00:00:00 2001 From: itqop Date: Mon, 3 Mar 2025 05:30:57 +0300 Subject: [PATCH] Add timeout --- telegram_bot/services/redis_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram_bot/services/redis_service.py b/telegram_bot/services/redis_service.py index b53df7d..d6c3e00 100644 --- a/telegram_bot/services/redis_service.py +++ b/telegram_bot/services/redis_service.py @@ -12,7 +12,7 @@ class RedisService: """Отправляет задачу в очередь аудио задач""" await self.client.rpush(self.task_channel, json.dumps(task_data)) - async def wait_for_text(self, user_id: int, chat_id: int, message_id: int, timeout: int = 30): + async def wait_for_text(self, user_id: int, chat_id: int, message_id: int, timeout: int = 180): """Ожидает результат обработки текста с помощью блокирующего ожидания""" start_time = asyncio.get_event_loop().time()