Async Jobs
Job Model
Long-running operations are queued through Celery and persisted in /data/jobs.json.
The job monitor in the frontend and the /jobs API expose the same lifecycle.
Typical statuses:
queuedstartedsuccessfailurerevoked
Common Job Routes
| Route | Purpose |
|---|---|
GET /jobs | list recent jobs |
GET /jobs/{job_id} | inspect one job |
POST /jobs/{job_id}/cancel | cancel a running or queued job when supported |
DELETE /jobs/{job_id} | remove one persisted job record |
Job Families You Will See
- NetCDF to GeoTIFF conversions
- terrain merge and terrain generation
- Mago terrain generation
- HySpex parent and child jobs
- MapCache cleanup layer jobs
Frontend Monitoring
The /ui/ jobs panel provides:
- active job polling
- inline inspection of result payloads and errors
- job cancellation
- campaign badges for HySpex campaign-linked jobs
Worker Recycling
The local swarm profile currently uses:
CELERY_MAX_TASKS_PER_CHILD=4CELERY_MAX_MEMORY_PER_CHILD_KB=1048576
This keeps long-running ingestion and conversion jobs from accumulating unbounded process memory.
The memory threshold behaves as a recycling hint rather than an immediate hard kill, so use task-per-child as the primary containment mechanism.