refactor(core): Move multi-main state to InstanceSettings (#12144)

This commit is contained in:
Iván Ovejero
2024-12-11 18:25:22 +01:00
committed by GitHub
parent 77e2c75ca6
commit 28f1f6b561
18 changed files with 96 additions and 103 deletions

View File

@@ -32,7 +32,6 @@ import { setupPushServer, setupPushHandler, Push } from '@/push';
import type { APIRequest } from '@/requests';
import * as ResponseHelper from '@/response-helper';
import type { FrontendService } from '@/services/frontend.service';
import { OrchestrationService } from '@/services/orchestration.service';
import '@/controllers/active-workflows.controller';
import '@/controllers/annotation-tags.controller.ee';
@@ -79,7 +78,6 @@ export class Server extends AbstractServer {
constructor(
private readonly loadNodesAndCredentials: LoadNodesAndCredentials,
private readonly orchestrationService: OrchestrationService,
private readonly postHogClient: PostHogClient,
private readonly eventService: EventService,
private readonly instanceSettings: InstanceSettings,
@@ -111,7 +109,7 @@ export class Server extends AbstractServer {
}
private async registerAdditionalControllers() {
if (!inProduction && this.orchestrationService.isMultiMainSetupEnabled) {
if (!inProduction && this.instanceSettings.isMultiMain) {
await import('@/controllers/debug.controller');
}