fix(core): Register transition handlers after modules init (#16308)

This commit is contained in:
Iván Ovejero
2025-06-13 12:24:35 +02:00
committed by GitHub
parent cb81826cf1
commit 7177e3aab0
3 changed files with 4 additions and 6 deletions

View File

@@ -31,7 +31,6 @@ import { ModuleRegistry } from '@/modules/module-registry';
import { ModulesConfig } from '@/modules/modules.config';
import { NodeTypes } from '@/node-types';
import { PostHogClient } from '@/posthog';
import { MultiMainSetup } from '@/scaling/multi-main-setup.ee';
import { ShutdownService } from '@/shutdown/shutdown.service';
import { WorkflowHistoryManager } from '@/workflows/workflow-history.ee/workflow-history-manager.ee';
@@ -86,10 +85,6 @@ export abstract class BaseCommand extends Command {
}
this.moduleRegistry.addEntities();
if (this.instanceSettings.isMultiMain) {
Container.get(MultiMainSetup).registerEventHandlers();
}
}
async init(): Promise<void> {

View File

@@ -249,6 +249,10 @@ export class Start extends BaseCommand {
}
await this.moduleRegistry.initModules();
if (this.instanceSettings.isMultiMain) {
Container.get(MultiMainSetup).registerEventHandlers();
}
}
async initOrchestration() {

View File

@@ -27,7 +27,6 @@ export class InsightsService {
this.logger = this.logger.scoped('insights');
}
@OnLeaderTakeover()
startTimers() {
this.collectionService.startFlushingTimer();