Task Handlers¶
- class bot.handlers.task.TaskCreationStates(*args, **kwargs)[source]¶
Bases:
StatesGroup
States for task creation flow.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- async bot.handlers.task.cancel_task_creation(callback, state)¶
Cancel task creation process.
- Return type:
- Parameters:
callback (aiogram.types.CallbackQuery)
state (aiogram.fsm.context.FSMContext)
- async bot.handlers.task.command_create_task(message, state)¶
Create a new autonomous search task: /task <description> or /task to start interactive mode.
- Return type:
- Parameters:
message (aiogram.types.Message)
state (aiogram.fsm.context.FSMContext)
- async bot.handlers.task.command_history_handler(message)¶
Show task history with selection and pagination.
- Return type:
- Parameters:
message (aiogram.types.Message)
- async bot.handlers.task.command_status_handler(message)¶
Show current task status with enhanced information.
- Return type:
- Parameters:
message (aiogram.types.Message)
- async bot.handlers.task.create_task_for_user(user, description, message)[source]¶
Create task for user with full validation and queue management.
- bot.handlers.task.format_time_estimate(seconds)[source]¶
Format time estimate in human readable format.
- bot.handlers.task.get_status_emoji(status)[source]¶
Get emoji for task status.
- Parameters:
status – Task status (enum or string)
- Return type:
- Returns:
Emoji string
- async bot.handlers.task.history_back_to_list(callback)¶
Go back to task history list.
- Return type:
- Parameters:
callback (aiogram.types.CallbackQuery)
- async bot.handlers.task.process_task_description(message, state)¶
Process task description in interactive mode.
- Return type:
- Parameters:
message (aiogram.types.Message)
state (aiogram.fsm.context.FSMContext)
- async bot.handlers.task.rate_limit_check(message, action_type)[source]¶
Check rate limits for user action and send error message if exceeded.
- async bot.handlers.task.show_recent_analyses_all(callback)¶
Show recent analyses from all user tasks.
- Return type:
- Parameters:
callback (aiogram.types.CallbackQuery)
- async bot.handlers.task.show_task_history(callback)¶
Show detailed history for a specific task.
- Return type:
- Parameters:
callback (aiogram.types.CallbackQuery)