execution
execution ¶
Execution components of the flow package.
FlowContext ¶
Central manager for flow coordination and service access.
Source code in src/flow/core/context.py
cleanup ¶
Cleanup all managers and resources.
Source code in src/flow/core/context.py
fail_flow
async
¶
Mark a flow as failed with the given reason.
Source code in src/flow/core/context.py
get_flow ¶
get_instance
classmethod
¶
get_instance() -> FlowContext
handle_flow_failure
async
¶
handle_flow_failure(process_id: str) -> None
Handle flow failure and notify dependent flows.
Source code in src/flow/core/context.py
has_cycle ¶
Check if adding a flow would create a cycle.
register_dependency ¶
Register a dependency relationship between flows.
Source code in src/flow/core/context.py
register_flow ¶
register_flow(flow: Flow) -> None
Register a flow with the context.
Source code in src/flow/core/context.py
wait_for_flows
async
¶
Wait for multiple flows to complete.
Source code in src/flow/core/context.py
ProcessPoolManager ¶
Manages process and thread pools for flow execution.
Source code in src/flow/execution/pool.py
shutdown ¶
shutdown(wait: bool = True) -> None
Shutdown the pool manager.
Source code in src/flow/execution/pool.py
submit_task
async
¶
submit_task(
process_id: str,
flow_type: FlowType,
func: Callable,
input_data: Dict[str, Any],
timeout: Optional[float] = None,
) -> Any
Submit a task for execution.
Source code in src/flow/execution/pool.py
wait_for_task
async
¶
Wait for a specific task to complete.