Fix issue with queue mode

This commit is contained in:
Jan Oberhauser 2021-10-21 18:25:31 -05:00
parent a0b89ee5a4
commit 6fa8dd701e
4 changed files with 11 additions and 3 deletions

View file

@ -312,6 +312,9 @@ export class Start extends Command {
);
}
const instanceId = await UserSettings.getInstanceId();
InternalHooksManager.init(instanceId);
await Server.start();
// Start to get active workflows and run their triggers

View file

@ -18,6 +18,7 @@ import {
Db,
ExternalHooks,
GenericHelpers,
InternalHooksManager,
LoadNodesAndCredentials,
NodeTypes,
WebhookServer,
@ -147,6 +148,9 @@ export class Webhook extends Command {
// Wait till the database is ready
await startDbInitPromise;
const instanceId = await UserSettings.getInstanceId();
InternalHooksManager.init(instanceId);
if (config.get('executions.mode') === 'queue') {
const redisHost = config.get('queue.bull.redis.host');
const redisPassword = config.get('queue.bull.redis.password');

View file

@ -26,7 +26,7 @@ import {
IBullJobData,
IBullJobResponse,
IExecutionFlattedDb,
IExecutionResponse,
InternalHooksManager,
LoadNodesAndCredentials,
NodeTypes,
ResponseHelper,
@ -259,6 +259,9 @@ export class Worker extends Command {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Worker.jobQueue.process(flags.concurrency, async (job) => this.runJob(job, nodeTypes));
const instanceId = await UserSettings.getInstanceId();
InternalHooksManager.init(instanceId);
const versions = await GenericHelpers.getVersions();
console.info('\nn8n worker is now ready');

View file

@ -312,8 +312,6 @@ class App {
this.frontendSettings.personalizationSurvey =
await PersonalizationSurvey.preparePersonalizationSurvey();
InternalHooksManager.init(this.frontendSettings.instanceId);
await this.externalHooks.run('frontend.settings', [this.frontendSettings]);
const excludeEndpoints = config.get('security.excludeEndpoints') as string;