MCPcopy Create free account
hub / github.com/FastLED/FastLED / RunningProcessGroup

Class RunningProcessGroup

ci/util/running_process_group.py:113–763  ·  view source on GitHub ↗

Manages execution of a group of RunningProcess instances.

Source from the content-addressed store, hash-verified

111
112
113class RunningProcessGroup:
114 """Manages execution of a group of RunningProcess instances."""
115
116 def __init__(
117 self,
118 processes: Optional[list[RunningProcess]] = None,
119 config: Optional[ProcessExecutionConfig] = None,
120 name: str = "ProcessGroup",
121 ):
122 """Initialize a new process group.
123
124 Args:
125 processes: List of RunningProcess instances to manage
126 config: Configuration for execution behavior
127 name: Name for this process group (used for logging)
128 """
129 self.processes = processes or []
130 self.config = config or ProcessExecutionConfig()
131 self.name = name
132 self._dependencies: dict[RunningProcess, list[RunningProcess]] = {}
133
134 # Status tracking
135 self._process_start_times: dict[RunningProcess, datetime] = {}
136 self._process_last_output: dict[RunningProcess, str] = {}
137 self._status_monitoring_active: bool = False
138
139 def add_process(self, process: RunningProcess) -> None:
140 """Add a process to the group.
141
142 Args:
143 process: RunningProcess instance to add
144 """
145 if process not in self.processes:
146 self.processes.append(process)
147
148 def add_dependency(
149 self, process: RunningProcess, depends_on: RunningProcess
150 ) -> None:
151 """Add a dependency relationship between processes.
152
153 Args:
154 process: The dependent process
155 depends_on: The process that must complete first
156 """
157 if process not in self.processes:
158 self.add_process(process)
159 if depends_on not in self.processes:
160 self.add_process(depends_on)
161
162 if process not in self._dependencies:
163 self._dependencies[process] = []
164 self._dependencies[process].append(depends_on)
165
166 def add_sequential_chain(self, processes: list[RunningProcess]) -> None:
167 """Add processes that must run in sequence.
168
169 Args:
170 processes: List of processes to run sequentially

Callers 2

mainFunction · 0.90
run_test_processesFunction · 0.90

Calls

no outgoing calls

Tested by 2

mainFunction · 0.72
run_test_processesFunction · 0.72