File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -112,15 +112,33 @@ def stop_scenario(scenario_name):
112112 )
113113
114114
115- def stop_all_scenarios (scenarios ):
116- """Stop all active scenarios in parallel using multiprocessing"""
115+ def _stop_single (scenario : str ) -> str :
116+ """
117+ Stop a single scenario
118+
119+ Args:
120+ scenario: Name of the scenario to stop
121+
122+ Returns:
123+ str: Message indicating the scenario has been stopped
124+ """
125+ stop_scenario (scenario )
126+ return f"Stopped scenario: { scenario } "
127+
117128
118- def stop_single (scenario ):
119- stop_scenario (scenario )
120- return f"Stopped scenario: { scenario } "
129+ def stop_all_scenarios (scenarios ) -> None :
130+ """
131+ Stop all active scenarios in parallel using multiprocessing
132+
133+ Args:
134+ scenarios: List of scenario names to stop
135+
136+ Returns:
137+ None
138+ """
121139
122140 with console .status ("[bold yellow]Stopping all scenarios...[/bold yellow]" ), Pool () as pool :
123- results = pool .map (stop_single , scenarios )
141+ results = pool .map (_stop_single , scenarios )
124142
125143 for result in results :
126144 console .print (f"[bold green]{ result } [/bold green]" )
You can’t perform that action at this time.
0 commit comments