refactor(core): Move queueModeId as hostId to InstanceSettings (#11262)

This commit is contained in:
Iván Ovejero
2024-10-15 14:55:13 +02:00
committed by GitHub
parent d3b05f1c54
commit 05467fd101
27 changed files with 123 additions and 127 deletions

View File

@@ -5,7 +5,6 @@ import { engine as expressHandlebars } from 'express-handlebars';
import { readFile } from 'fs/promises';
import type { Server } from 'http';
import isbot from 'isbot';
import type { InstanceType } from 'n8n-core';
import { Container, Service } from 'typedi';
import config from '@/config';
@@ -22,7 +21,6 @@ import { TestWebhooks } from '@/webhooks/test-webhooks';
import { WaitingWebhooks } from '@/webhooks/waiting-webhooks';
import { createWebhookHandlerFor } from '@/webhooks/webhook-request-handler';
import { generateHostInstanceId } from './databases/utils/generators';
import { ServiceUnavailableError } from './errors/response-errors/service-unavailable.error';
@Service()
@@ -61,7 +59,7 @@ export abstract class AbstractServer {
readonly uniqueInstanceId: string;
constructor(instanceType: Exclude<InstanceType, 'worker'>) {
constructor() {
this.app = express();
this.app.disable('x-powered-by');
@@ -85,8 +83,6 @@ export abstract class AbstractServer {
this.endpointWebhookTest = this.globalConfig.endpoints.webhookTest;
this.endpointWebhookWaiting = this.globalConfig.endpoints.webhookWaiting;
this.uniqueInstanceId = generateHostInstanceId(instanceType);
this.logger = Container.get(Logger);
}