prefect.server.schemas.states
State schemas.
Functions
Scheduled
Scheduled states.
Returns:
- a Scheduled state
Completed
Completed states.
Returns:
- a Completed state
Running
Running states.
Returns:
- a Running state
Failed
Failed states.
Returns:
- a Failed state
Crashed
Crashed states.
Returns:
- a Crashed state
Cancelling
Cancelling states.
Returns:
- a Cancelling state
Cancelled
Cancelled states.
Returns:
- a Cancelled state
Pending
Pending states.
Returns:
- a Pending state
Paused
Paused states.
Returns:
- a Paused state
Suspended
Suspended states.
Returns:
- a Suspended state
AwaitingRetry
AwaitingRetry states.
Returns:
- an AwaitingRetry state
AwaitingConcurrencySlot
AwaitingConcurrencySlot states.
Returns:
- an AwaitingConcurrencySlot state
Retrying
Retrying states.
Returns:
- a Retrying state
Late
Late states.
Returns:
- a Late state
Classes
StateType
Enumeration of state types.
Methods:
auto
enum.auto() to avoid requiring a second import to use AutoEnum
CountByState
Methods:
check_key
model_validate_list
reset_fields
_reset_fields set.
Returns:
- A new instance of the model with the reset fields.
StateDetails
Methods:
model_validate_list
reset_fields
_reset_fields set.
Returns:
- A new instance of the model with the reset fields.
StateBaseModel
Methods:
orm_dict
State schema object and converting it into an ORM-compatible
format. Because the data field is not writable on ORM states, this method
omits the data field entirely for the purposes of constructing an ORM model.
If state data is required, an artifact must be created separately.
State
Represents the state of a run.
Methods:
default_name_from_type
default_scheduled_start_time
fresh_copy
from_orm_without_result
data field will not be eagerly loaded. In
these cases, sqlalchemy will attempt to lazily load the the relationship, which
will fail when called within a synchronous pydantic method.
This method will construct a State object from an ORM model without a loaded
artifact and attach data passed using the with_data argument to the data
field.
is_cancelled
is_cancelling
is_completed
is_crashed
is_failed
is_final
is_paused
is_pending
is_running
is_scheduled
orm_dict
State schema object and converting it into an ORM-compatible
format. Because the data field is not writable on ORM states, this method
omits the data field entirely for the purposes of constructing an ORM model.
If state data is required, an artifact must be created separately.