Add timeout

This commit is contained in:
itqop 2025-03-03 05:30:57 +03:00
parent 7f1a2e3d2d
commit 7bc173f6e9
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ class RedisService:
"""Отправляет задачу в очередь аудио задач""" """Отправляет задачу в очередь аудио задач"""
await self.client.rpush(self.task_channel, json.dumps(task_data)) 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() start_time = asyncio.get_event_loop().time()