Skip to content

Commit 1e1a99a

Browse files
committed
fix(bot): remove serialize_user_updates from on_text to unblock UI
- Remove @serialize_user_updates from on_text in bot_handlers.py - on_text holds the per-user lock for 5-10s during AI generation, blocking all button/callback handlers for the same user - Keep @serialize_user_updates on all fast handlers (settings, chats, connect, disconnect, status) where race conditions on DB writes are the real concern
1 parent 4c83720 commit 1e1a99a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

handlers/bot_handlers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ async def on_start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
5252
await update_user_menu(context.bot, u.id, u.language_code, is_connected)
5353

5454

55-
@serialize_user_updates
5655
@typing_action
5756
async def on_text(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
5857
"""Обработчик текстовых сообщений — генерирует ответ через ИИ."""

0 commit comments

Comments
 (0)