Skip to content

Commit 6da785e

Browse files
committed
fix: set _processes_started flag after successful start, not before
If start_processes() raised partway through spawning workers, the flag was already True, causing a subsequent retry call to be a silent no-op. Moving the assignment to the end means a failed start remains retryable.
1 parent a869c51 commit 6da785e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/conductor/client/automator/task_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ def stop_processes(self) -> None:
351351
def start_processes(self) -> None:
352352
if self._processes_started:
353353
return
354-
self._processes_started = True
355354
logger.info("Starting worker processes...")
356355
freeze_support()
357356
self._monitor_stop_event.clear()
@@ -376,6 +375,7 @@ def start_processes(self) -> None:
376375
self.stop_processes()
377376
raise
378377
self.__start_monitor_thread()
378+
self._processes_started = True
379379
logger.info("Started all processes")
380380

381381
def join_processes(self) -> None:

0 commit comments

Comments
 (0)