prefect.server.models.flow_runs
Functions for interacting with flow run ORM objects.
Intended for internal use by the Prefect REST API.
Functions
create_flow_run
session
: a database sessionflow_run
: a flow run model
- orm_models.FlowRun: the newly-created flow run
update_flow_run
session
: a database sessionflow_run_id
: the flow run id to updateflow_run
: a flow run model
- whether or not matching rows were found to update
read_flow_run
session
: A database sessionflow_run_id
: a flow run id
- orm_models.FlowRun: the flow run
read_flow_runs
session
: a database sessioncolumns
: a list of the flow run ORM columns to load, for performanceflow_filter
: only select flow runs whose flows match these filtersflow_run_filter
: only select flow runs match these filterstask_run_filter
: only select flow runs whose task runs match these filtersdeployment_filter
: only select flow runs whose deployments match these filtersoffset
: Query offsetlimit
: Query limitsort
: Query sort
- List[orm_models.FlowRun]: flow runs
cleanup_flow_run_concurrency_slots
read_task_run_dependencies
count_flow_runs
session
: a database sessionflow_filter
: only count flow runs whose flows match these filtersflow_run_filter
: only count flow runs that match these filterstask_run_filter
: only count flow runs whose task runs match these filtersdeployment_filter
: only count flow runs whose deployments match these filters
- count of flow runs
delete_flow_run
session
: A database sessionflow_run_id
: a flow run id
- whether or not the flow run was deleted
set_flow_run_state
state
input. If
the state is considered valid, it will be written to the database. Otherwise, a
it’s possible a different state, or no state, will be created. A force
flag is
supplied to bypass a subset of orchestration logic.
Args:
session
: a database sessionflow_run_id
: the flow run idstate
: a flow run state modelforce
: if False, orchestration rules will be applied that may alter or prevent the state transition. If True, orchestration rules are not applied.
- OrchestrationResult object
read_flow_run_graph
since
datetime is provided, only return items that may have changed since that time.
with_system_labels_for_flow_run
update_flow_run_labels
Classes
DependencyResult
Methods:
model_validate_list
reset_fields
_reset_fields
set.
Returns:
- A new instance of the model with the reset fields.