Source: apps/search_console_tools/models.py.

๐ŸŽฏ Purpose

CommandRequest is the main unit of work in the system.

๐Ÿงพ Key fields

  • command โ€” string enum
  • account โ€” FK to Account
  • payload โ€” JSON command parameters
  • headless โ€” controls Playwright headless mode
  • callback_url โ€” optional; if set, a callback is sent after completion
  • status โ€” NEW / IN_PROGRESS / COMPLETED / FAILED
  • result โ€” text (usually JSON string)
  • errors โ€” text
  • screenshot โ€” file (local or S3)
  • initiator โ€” API / ADMIN / SCHEDULER / UNKNOWN

๐Ÿ—๏ธ Factory methods

The model contains helpers to create typed requests:

  • command_check_domain_safety_request(...)
  • command_send_appeal_request(...)
  • command_get_account_domains_request(...)