Built-in task states.
See States.
Set of states meaning the task result is ready (has been executed).
Set of states meaning the task result is not ready (hasn’t been executed).
Set of states meaning the task returned an exception.
Set of exception states that should propagate exceptions to the user.
Set of all possible states.
- celery.states.FAILURE='FAILURE'
-
Task failed
- celery.states.PENDING='PENDING'
-
Task state is unknown (assumed pending since you know the id).
- celery.states.RECEIVED='RECEIVED'
-
Task was received by a worker (only used in events).
- celery.states.RETRY='RETRY'
-
Task is waiting for retry.
- celery.states.REVOKED='REVOKED'
-
Task was revoked.
- celery.states.STARTED='STARTED'
-
Task was started by a worker (
task_track_started).
- celery.states.SUCCESS='SUCCESS'
-
Task succeeded
- celery.states.precedence(state:str) int
-
Get the precedence index for state.
Lower index means higher precedence.
- classcelery.states.state
-
Task state.
State is a subclass of
str, implementing comparison methods adhering to state precedence rules:>>> fromcelery.statesimport state, PENDING, SUCCESS >>> state(PENDING) < state(SUCCESS) True
Any custom state is considered to be lower than
FAILUREandSUCCESS, but higher than any of the other built-in states:>>> state('PROGRESS') > state(STARTED) True >>> state('PROGRESS') > state('SUCCESS') False
Copyright © 2017-2026 Asif Saif Uddin, core team & contributors. All rights reserved.
Celery is licensed under The BSD License (3 Clause, also known as the new BSD license). The license is an OSI approved Open Source license and is GPL-compatible.
https://docs.celeryq.dev/en/stable/reference/celery.states.html