Skip to content

Conversation

@maciejjanowski-tw
Copy link

This reverts commit feb952f.## Summary

  • Adds periodic logging every 30 seconds in the click_captions_button wait loop to provide visibility when bots are waiting to be admitted to Google Meet
  • Implements graceful handling for Celery SoftTimeLimitExceeded exceptions with proper event recording
  • Makes the soft time limit configurable via environment variable (default: 4 hours)

Changes

Periodic Logging (google_meet_ui_methods.py)

  • Added logging in the TimeoutException handler that fires every 30 iterations (~30 seconds)
  • Log message includes: current attempt number, total attempts, elapsed time, and confirmation that denial/blocked patterns are being checked

SoftTimeLimitExceeded Handling

  • settings/base.py: Added BOT_TASK_SOFT_TIME_LIMIT_SECONDS setting (default: 14400s / 4 hours)
  • models.py: Added new FATAL_ERROR_SOFT_TIME_LIMIT_EXCEEDED event subtype (code: soft_time_limit_exceeded)
  • run_bot_task.py:
    • Uses configurable soft_time_limit from settings
    • Catches SoftTimeLimitExceeded and creates a proper FATAL_ERROR event
    • Ensures cleanup runs before task exits

STAGED Bot Handling (bot_controller.py)

  • Added interrupted_while_staged flag to track if bot was interrupted during STAGED state
  • When interrupted in STAGED state, skips creating FATAL_ERROR event to allow task retry

Configuration

Set BOT_TASK_SOFT_TIME_LIMIT_SECONDS environment variable to override the default 4-hour limit.

@maciejjanowski-tw maciejjanowski-tw merged commit 60c5315 into main Jan 27, 2026
@maciejjanowski-tw maciejjanowski-tw deleted the feature/bot-logging-improvements branch January 27, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants