feat(core): Support community packages in scaling-mode (#10228)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-08-05 11:52:06 +02:00
committed by GitHub
parent afa43e75f6
commit 88086a41ff
19 changed files with 187 additions and 129 deletions

View File

@@ -3,7 +3,6 @@ import { Flags, type Config } from '@oclif/core';
import express from 'express';
import http from 'http';
import type PCancelable from 'p-cancelable';
import { GlobalConfig } from '@n8n/config';
import { WorkflowExecute } from 'n8n-core';
import type { ExecutionStatus, IExecuteResponsePromiseData, INodeTypes, IRun } from 'n8n-workflow';
import { Workflow, sleep, ApplicationError } from 'n8n-workflow';
@@ -57,6 +56,8 @@ export class Worker extends BaseCommand {
redisSubscriber: RedisServicePubSubSubscriber;
override needsCommunityPackages = true;
/**
* Stop n8n in a graceful way.
* Make for example sure that all the webhooks from third party services
@@ -429,8 +430,7 @@ export class Worker extends BaseCommand {
let presetCredentialsLoaded = false;
const globalConfig = Container.get(GlobalConfig);
const endpointPresetCredentials = globalConfig.credentials.overwrite.endpoint;
const endpointPresetCredentials = this.globalConfig.credentials.overwrite.endpoint;
if (endpointPresetCredentials !== '') {
// POST endpoint to set preset credentials
app.post(