TaskStatus enum

Explicit lifecycle of a persisted task.

waiting → pending              (every dependency completed)
waiting → cancelled or failed  (a dependency did not complete)
pending → running → completed
                 ↘ retryScheduled → running
                 ↘ failed
pending, waiting, or retryScheduled → cancelled
failed or cancelled → pending or waiting   (DurableQueue.retry)
Inheritance
Available extensions

Values

pending → const TaskStatus

Stored and eligible to start when the queue is running.

running → const TaskStatus

A handler invocation is in progress.

retryScheduled → const TaskStatus

The last attempt failed and another attempt is scheduled.

completed → const TaskStatus

The handler finished successfully.

failed → const TaskStatus

The handler failed and no further attempts will be made.

cancelled → const TaskStatus

The task was cancelled before it finished.

waiting → const TaskStatus

Stored, but blocked until the tasks it depends on have finished.

Declared last so that the indexes of earlier values are unchanged.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
isActive → bool
Whether the task can still run: pending, waiting, running, or retryScheduled.
no setter
isTerminal → bool
Whether the task has finished: completed, failed, or cancelled.
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

Constants

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