API Reference - Signals¶
Core signal system components and built-in signals.
Signal System¶
SoftSignal¶
- class SoftSignal¶
Base class for implementing the soft signal system.
Methods:
- connect(sender: Any, listener: Callable) None¶
Connect a listener function to this signal.
- Parameters:
sender – The sender class/instance to listen for
listener – The callback function to execute
- disconnect(sender: Any, listener: Callable) None¶
Disconnect a listener from this signal.
- emit(sender: Any, **kwargs) List[Tuple[Any, Any]]¶
Emit the signal to all registered listeners.
- Parameters:
sender – The sender instance triggering the signal
kwargs – Additional data to pass to listeners
- Returns:
List of (listener, response) tuples
Built-in Signals¶
Pipeline Lifecycle¶
- pipeline_pre_init¶
Signal emitted before pipeline initialization.
- Arguments:
cls: The pipeline class
args: Initialization positional arguments
kwargs: Initialization keyword arguments
- pipeline_post_init¶
Signal emitted after pipeline initialization.
- Arguments:
pipeline: The initialized pipeline instance
- pipeline_shutdown¶
Signal emitted during pipeline shutdown.
- Arguments:
pipeline: The pipeline instance
execution_context: Current execution context
- pipeline_stop¶
Signal emitted when pipeline is stopped.
- Arguments:
pipeline: The pipeline instance
execution_context: Current execution context
Pipeline Execution¶
- pipeline_execution_start¶
Signal emitted when pipeline execution begins.
- Arguments:
pipeline: The pipeline instance
- pipeline_execution_end¶
Signal emitted when pipeline execution completes.
- Arguments:
execution_context: Final execution context
Event Execution¶
- event_execution_init¶
Signal emitted when event execution is initialized.
- Arguments:
event: The event being executed
execution_context: Current execution context
executor: The executor instance
call_kwargs: Event call arguments
- event_execution_start¶
Signal emitted when event execution starts.
- Arguments:
event: The event being executed
execution_context: Current execution context
- event_execution_end¶
Signal emitted when event execution ends.
- Arguments:
event: The completed event
execution_context: Current execution context
future: The execution future object
- event_execution_retry¶
Signal emitted when event execution is retried.
- Arguments:
event: The event being retried
execution_context: Current execution context
task_id: ID of the task being retried
backoff: Backoff strategy/duration
retry_count: Current retry attempt number
max_attempts: Maximum retry attempts allowed
- event_execution_retry_done¶
Signal emitted when event retry is completed.
- Arguments:
event: The retried event
execution_context: Current execution context
task_id: ID of the retried task
max_attempts: Maximum attempts allowed