📣 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 saveapps/search_console_tools/tasks.py— Celery tasksend_callback_taskapps/search_console_tools/callbacks.py— actual HTTP POST
📦 Payload
Callback payload includes:
idcommandaccount_emailstatusresulterrorsscreenshot_url(if present)created_atfinished_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.