<@ULVA73B9P> What are the possible state types? fl...
# ask-marvin
a
@Marvin What are the possible state types? flow_run.state_type
m
thought for 33.6 seconds
In Prefect 3.x, there are 13 possible state types that a flow run can have. Here they are, along with their meanings: 1. `SCHEDULED`: Flow run is scheduled but hasn't started 2. `PENDING`: Infrastructure setup is in progress 3. `RUNNING`: Flow is actively executing 4. `COMPLETED`: Successfully finished execution 5. `FAILED`: Unsuccessful due to code-related issues (no more retries) 6. `CRASHED`: Unsuccessful due to infrastructure issues 7. `CANCELLING`: In the process of cancellation 8. `CANCELLED`: Successfully cancelled 9. `PAUSED`: Temporarily halted 10. `SUSPENDED`: Halted but can be resumed 11. `AWAITINGRETRY`: Failed and waiting to retry 12. `RETRYING`: Currently attempting a retry 13. `LATE`: Missed its scheduled start time These state types help track the lifecycle of your flow runs and diagnose any issues that might occur during execution. You can find more detailed information in the states documentation and the Python API reference. The state type is particularly useful for monitoring and debugging your flows, as it gives you a clear indication of what's happening with your flow runs at any given time.
a
@Marvin Which state_type does
run_deployment
not end?
m
thought for 46.8 seconds
When using
run_deployment
, it will wait for the flow run to reach a terminal state (COMPLETED, FAILED, or CRASHED). However, it will not wait for non-terminal states, which include: - PENDING - RUNNING - CANCELLING - AWAITINGRETRY - RETRYING - SUSPENDED - PAUSED These non-terminal states indicate that the flow run is still in progress or in a transitional state. The
run_deployment
command will continue to poll until a terminal state is reached, unless configured otherwise. You can find more details about states and their behavior in the Prefect states documentation.