Unified states
The PENDING problem
Celery’sPENDING state is uniquely confusing. The Celery documentation itself notes it would be “better named ‘unknown’” because it’s the default state for any task ID — including ones that don’t exist.
If you query Celery for the state of task abc123 and get PENDING, that could mean:
- The task was dispatched and is waiting in the queue
- The task ID is a typo and no such task was ever created
- The task completed hours ago and the result backend has already expired the record
task-sent event (enabled by task_send_sent_event=True). When Sluice sees a task-sent event, it creates the job record with state queued. A task that Sluice has never seen remains unknown — and the dashboard makes the distinction clear.
State transitions
Jobs move through states in a predictable flow: Every transition is recorded in the job’s state history, which you can view in the Job Detail page or retrieve via the API.Management actions by state
Not every state allows every action. The available management actions depend on the job’s current state:
Attempting an action on a job in a disallowed state returns a
400 error with a descriptive message.