TaskState enum

Lifecycle states a task moves through, mirroring Celery's task states.

Inheritance
Available extensions

Values

pending → const TaskState

Accepted by the broker, not yet picked up by a worker.

scheduled → const TaskState

Held back for a future DateTime via an ETA / countdown.

started → const TaskState

A worker has begun executing the task.

success → const TaskState

The handler returned normally; a result may be available.

failure → const TaskState

The handler raised and no retries remain.

retry → const TaskState

The handler asked to retry (or raised with retries remaining); the task has been re-enqueued.

revoked → const TaskState

The task was revoked before (or during) execution.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isDone bool
Whether this is a terminal state (no further transitions expected).
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parse(String? value) TaskState
Parses a TaskState from its name, defaulting to pending.

Constants

values → const List<TaskState>
A constant List of the values in this enum, in order of their declaration.