refactor(core): Decouple lifecycle events from internal hooks (no-changelog) (#10305)

This commit is contained in:
Iván Ovejero
2024-08-07 16:09:42 +02:00
committed by GitHub
parent b232831f18
commit 9b977e80f6
11 changed files with 129 additions and 119 deletions

View File

@@ -16,7 +16,6 @@ import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
import { Server } from '@/Server';
import { EDITOR_UI_DIST_DIR, LICENSE_FEATURES } from '@/constants';
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
import { InternalHooks } from '@/InternalHooks';
import { License } from '@/License';
import { OrchestrationService } from '@/services/orchestration.service';
import { OrchestrationHandlerMainService } from '@/services/orchestration/main/orchestration.handler.main.service';
@@ -110,7 +109,7 @@ export class Start extends BaseCommand {
await Container.get(OrchestrationService).shutdown();
}
await Container.get(InternalHooks).onN8nStop();
Container.get(EventService).emit('instance-stopped');
await Container.get(ActiveExecutions).shutdown();