No description
- Python 99.4%
- Dockerfile 0.6%
| tests/integration | ||
| worker | ||
| .env.example | ||
| .gitignore | ||
| .woodpecker.yml | ||
| AGENTS.md | ||
| DISPATCH_WORKER_INSTRUCTION.md | ||
| docker-compose.production.yml | ||
| docker-compose.test.yml | ||
| Dockerfile | ||
| README.md | ||
| requirements.txt | ||
Dispatch Worker
Standalone RabbitMQ dispatch worker that sends to Mailjet and immediately updates dispatch status in the internal API.
Run
python -m worker.dispatch_worker
Required environment variables
RABBITMQ_URLRABBITMQ_PRIORITY_QUEUES(comma-separated, highest to lowest)MAILJET_API_KEYMAILJET_SECRET_KEYDISPATCH_API_BASE_URLDISPATCH_SYSTEM_API_KEY
Optional environment variables
WORKER_IDLE_SLEEP_MS(default150)WORKER_PREFETCH_COUNT(default10)WORKER_REQUEST_TIMEOUT_SECONDS(default15)WORKER_MAX_RETRIES(default5)
Behavior summary
- Strict queue priority polling using ordered
RABBITMQ_PRIORITY_QUEUES - Ack only after Mailjet accepts and callback returns HTTP 200
- Validation errors rejected without requeue
- Transient failures nacked with requeue
- Mailjet 4xx failures retried with bounded retry header, then dead-letter flow
Tests
python -m pytest