fix(processmanager): Improve process lifecycle handling and cleanup in daemon, monitors and wrappers
This commit is contained in:
@@ -499,8 +499,12 @@ export class ProcessManager extends EventEmitter {
|
||||
*/
|
||||
public async startAll(): Promise<void> {
|
||||
for (const [id, config] of this.processConfigs.entries()) {
|
||||
if (!this.processes.has(id)) {
|
||||
const monitor = this.processes.get(id);
|
||||
if (!monitor) {
|
||||
await this.start(config);
|
||||
} else if (!monitor.isRunning()) {
|
||||
// If a monitor exists but is not running, restart the process to ensure a clean start
|
||||
await this.restart(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user