Skip to content

Controller

This module defines an PipelineController responsible for managing a pipeline of processes and handling potential errors that occur during their execution.

Classes:

Name Description
PipelineController

Manages a pipeline of processes and handles errors that occur during.

Copyright (C) 2025 Matti Kaupenjohann

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

PipelineController

Coordinates pipeline permanences and processes.

Responsibilities: - Manage permanence lifecycle - Provide permanence access to processes - Instantiate processes with their parameters - Yield processes for execution

cleanup()

Cleanup all permanences.

get_permanence(name, default=_MISSING)

Get a permanence by name.

Parameters:

Name Type Description Default
name str

Name of the permanence to retrieve

required
default Any

Value to return if permanence not found. If not provided, raises PermanenceKeyError instead. Can be None.

_MISSING

Returns:

Type Description
Any

The permanence instance or default value

Raises:

Type Description
PermanenceKeyError

If permanence not found and no default provided

get_permanence_count()

Get total number of permanences.

get_process_count()

Get total number of processes.

iterate_permanences()

Yield permanence instances for cleanup or inspection.

iterate_processes()

Yield (index, process_instance) for execution.