states
prefect.states
Functions
to_state_create
Convert the state to a StateCreate
type which can be used to set the state of
a run in the API.
This method will drop this state’s data
if it is not a result type. Only
results should be sent to the API. Other data is only available locally.
format_exception
is_state_iterable
Check if a the given object is an iterable of states types
Supported iterables are:
- set
- list
- tuple
Other iterables will return False
even if they contain states.
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
StateGroup
Methods: