Source: apps/search_console_tools/management/commands/command_request_starter.py.

🎯 Purpose

This process dispatches NEW CommandRequest records to Celery.

🧠 Why it is a separate process

The system separates:

  • request creation (CommandRequest)
  • execution (Celery worker)
  • dispatching (this starter)

This makes it easier to control concurrency and account-level load.

🚦 Rule: one command per account

Selection algorithm:

  • for each Account:
    • if there is any IN_PROGRESS request → skip
    • otherwise take the earliest NEW request

⏱️ Timers

Configured in code:

  • loop interval: 90–150 seconds
  • per-task countdown: 0–15 seconds