Worker Orchestration¶
xcore integrates with Celery to handle background tasks, scheduled jobs, and asynchronous processing.
Overview¶
The worker command group manages the lifecycle of your background processing fleet.
| Command | Description |
|---|---|
start |
Launch a Celery worker |
beat |
Start the periodic task scheduler (APScheduler) |
inspect |
Check worker health and registered tasks |
purge |
Clear all messages from a queue |
process |
Fine-grained process management (see below) |
Managing Workers¶
Start a Worker¶
| Default start | |
|---|---|
| With queues and concurrency | |
|---|---|
Inspect Workers¶
Check which worker nodes are online and what tasks they can run:
| Inspect active workers | |
|---|---|
Purging Queues¶
Clear a queue if it has accumulated stale or unwanted tasks:
Periodic Tasks (Beat)¶
Start the Celery Beat scheduler that triggers recurring tasks:
Configure static jobs in integration.yaml:
| integration.yaml — scheduler jobs | |
|---|---|
Worker Configuration¶
| integration.yaml — xworker section | |
|---|---|
Queue Separation
Use dedicated queues for different task types to scale workers independently:
- default — general tasks
- email — transactional email sending
- heavy — CPU-intensive processing (reports, image resizing)
See Also¶
- Process Management
- Start, stop, and monitor multiple worker instances.
- XWorker Service
- Define
@taskdecorators and dispatch tasks from plugins.