📣 What is a callback

If CommandRequest.callback_url is set, the service sends an HTTP POST to that URL after completion (COMPLETED or FAILED).

Implementation:

  • apps/search_console_tools/signals.py — triggers sending after model save
  • apps/search_console_tools/tasks.py — Celery task send_callback_task
  • apps/search_console_tools/callbacks.py — actual HTTP POST

📦 Payload

Callback payload includes:

  • id
  • command
  • account_email
  • status
  • result
  • errors
  • screenshot_url (if present)
  • created_at
  • finished_at

Example (schematic):

{
  "id": 123,
  "command": "check_domain_safety",
  "account_email": "user@example.com",
  "status": "COMPLETED",
  "result": "true",
  "errors": null,
  "screenshot_url": "https://.../media/...png",
  "created_at": "2026-01-14T12:00:00Z",
  "finished_at": "2026-01-14T12:00:15Z"
}

📝 Notes

  • Callback is executed asynchronously by Celery.
  • If the callback endpoint is unavailable or returns non-2xx, the task fails.
  • HTTP timeout for the callback request is 30 seconds.

0 items under this folder.