Skip to main content

prefect.cli.flow_runs_watching

Utilities for following flow runs with interleaved events and logs

Functions

watch_flow_run

Watch a flow run, displaying interleaved events and logs until completion. Args:
  • flow_run_id: The ID of the flow run to watch
  • console: Rich console for output
  • timeout: Maximum time to wait for flow run completion in seconds. If None, waits indefinitely.
Returns:
  • The finished flow run
Raises:
  • FlowRunWaitTimeout: If the flow run exceeds the timeout

Classes

FlowRunFormatter

Handles formatting of logs and events for CLI display Methods:

format

Format a log or event for display

format_event

Format an event

format_log

Format a log entry

format_run_id

Format run ID

format_timestamp

Format timestamp with incremental display