API Reference - Pipeline¶
Core Pipeline Classes¶
Pipeline¶
- class Pipeline¶
Base class for defining pipelines that process events in sequence.
Class Attributes:
- __signature__: Signature | None¶
Cached signature for pipeline initialization.
Methods:
- start(force_rerun: bool = False)¶
Starts pipeline execution.
- Parameters:
force_rerun (bool) – Whether to force rerun of already executed events
- shutdown()¶
Shuts down the pipeline and cleans up resources.
- stop()¶
Stops pipeline execution.
- get_pipeline_tree() Tree¶
Gets a tree representation of the pipeline structure.
- Returns:
Tree object representing pipeline structure
- Return type:
Tree
- draw_ascii_graph()¶
Generates ASCII representation of pipeline graph.
- draw_graphviz_image(directory='pipeline-graphs')¶
Generates GraphViz visualization of pipeline.
- Parameters:
directory (str) – Output directory for graph images
BatchPipeline¶
PipelineTask¶
- class PipelineTask¶
Represents a task node in a pipeline execution graph.
Attributes:
- parent_node: PipelineTask | None¶
Parent task in execution tree.
- on_success_event: PipelineTask | None¶
Task to execute on success.
- on_failure_event: PipelineTask | None¶
Task to execute on failure.
Properties:
- property is_conditional: bool¶
Whether task has conditional branches.
- property is_parallel_execution_node: bool¶
Whether task is part of parallel execution.
Methods:
- get_children() List[PipelineTask]¶
Gets child task nodes.
- get_root() PipelineTask¶
Gets root task in tree.
- get_descriptor(descriptor: int) PipelineTask | None¶
Gets task associated with descriptor.
- Parameters:
descriptor (int) – Descriptor number
- Returns:
Associated task if found
- Return type:
Optional[PipelineTask]
EventExecutionContext¶
- class EventExecutionContext¶
Manages execution context for pipeline events.
Attributes:
- task_profiles: List[PipelineTask]¶
Tasks being executed.
- state: ExecutionState¶
Current execution state.
Methods:
- dispatch() SwitchTask | None¶
Dispatches task execution.
- Returns:
Task switch request if needed
- Return type:
Optional[SwitchTask]
- cancel()¶
Cancels task execution.
- execution_failed() bool¶
Checks if execution failed.
- Returns:
True if execution failed
- Return type:
bool
- execution_success() bool¶
Checks if execution succeeded.
- Returns:
True if execution succeeded
- Return type:
bool