states
prefect.server.schemas.states
State schemas.
Functions
Scheduled
Convenience function for creating Scheduled
states.
Returns:
- a Scheduled state
Completed
Convenience function for creating Completed
states.
Returns:
- a Completed state
Running
Convenience function for creating Running
states.
Returns:
- a Running state
Failed
Convenience function for creating Failed
states.
Returns:
- a Failed state
Crashed
Convenience function for creating Crashed
states.
Returns:
- a Crashed state
Cancelling
Convenience function for creating Cancelling
states.
Returns:
- a Cancelling state
Cancelled
Convenience function for creating Cancelled
states.
Returns:
- a Cancelled state
Pending
Convenience function for creating Pending
states.
Returns:
- a Pending state
Paused
Convenience function for creating Paused
states.
Returns:
- a Paused state
Suspended
Convenience function for creating Suspended
states.
Returns:
- a Suspended state
AwaitingRetry
Convenience function for creating AwaitingRetry
states.
Returns:
- an AwaitingRetry state
AwaitingConcurrencySlot
Convenience function for creating AwaitingConcurrencySlot
states.
Returns:
- an AwaitingConcurrencySlot state
Retrying
Convenience function for creating Retrying
states.
Returns:
- a Retrying state
Late
Convenience function for creating Late
states.
Returns:
- a Late state
Classes
StateType
Enumeration of state types.
CountByState
Methods:
check_key
StateDetails
StateBaseModel
Methods:
orm_dict
This method is used as a convenience method for constructing fixtues by first
building a 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:
from_orm_without_result
During orchestration, ORM states can be instantiated prior to inserting results
into the artifact table and the 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.
default_name_from_type
If a name is not provided, use the type
default_scheduled_start_time
is_scheduled
is_pending
is_running
is_completed
is_failed
is_crashed
is_cancelled
is_cancelling
is_final
is_paused
fresh_copy
Return a fresh copy of the state with a new ID.