# Flow Run
# FlowRunView
class
prefect.backend.flow_run.FlowRunView
(flow_run_id, name, flow_id, labels, parameters, context, state, states, updated_at, run_config, task_runs=None)[source]A view of Flow Run data stored in the Prefect API.
Provides lazy loading of Task Runs from the flow run.
This object is designed to be an immutable view of the data stored in the Prefect backend API at the time it is created. However, each time a task run is retrieved the latest data for that task will be pulled since they are loaded lazily. Finished task runs will be cached in this object to reduce the amount of network IO.
Args:
flow_run_id
: The uuid of the flow runname
: The name of the flow runflow_id
: The uuid of the flow this run is associated withstate
: The state of the flow runlabels
: The labels assigned to this flow runparameters
: Parameter overrides for this flow runcontext
: Context overrides for this flow runupdated_at
: When this flow run was last updated in the backendrun_config
: TheRunConfig
this flow run was configured withstates
: A sorted list of past states the flow run has been intask_runs
: An iterable of task run metadata to cache in this view
methods: |
---|
prefect.backend.flow_run.FlowRunView.from_flow_run_id (flow_run_id, load_static_tasks=False, _cached_task_runs=None)[source] |
Get an instance of this class filled with information by querying for the given flow run id
FlowRunView instance |
prefect.backend.flow_run.FlowRunView.get_all_task_runs ()[source] |
Get all task runs for this flow run in a single query. Finished task run data is cached so future lookups do not query the backend. |
prefect.backend.flow_run.FlowRunView.get_flow_metadata (no_cache=False)[source] |
Flow metadata for the flow associated with this flow run. Retrieved from the API on first call then cached for future calls.
|
prefect.backend.flow_run.FlowRunView.get_latest (load_static_tasks=False)[source] |
Get the a new copy of this object with the latest data from the API. Cached
|
prefect.backend.flow_run.FlowRunView.get_logs (start_time=None, end_time=None)[source] |
Get logs for this flow run from
FlowRunLog objects sorted by timestamp |
prefect.backend.flow_run.FlowRunView.get_task_run (task_slug=None, task_run_id=None, map_index=None)[source] |
Get information about a task run from this flow run. Lookup is available by one of the arguments. If the task information is not available locally already, we will query the database for it. If multiple arguments are provided, we will validate that they are consistent with each other.
|
prefect.backend.flow_run.FlowRunView.get_task_run_ids ()[source] |
Get all task run ids associated with this flow run. Lazily loaded at call time then cached for future calls. |
# Functions
top-level functions: |
---|
prefect.backend.flow_run.watch_flow_run (flow_run_id, stream_states=True, stream_logs=True, max_duration=datetime.timedelta(seconds=43200))[source] |
Watch execution of a flow run displaying state changes. This function will yield
|
This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC