mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
⚡ Fix issue with queue mode
This commit is contained in:
parent
a0b89ee5a4
commit
6fa8dd701e
|
@ -312,6 +312,9 @@ export class Start extends Command {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const instanceId = await UserSettings.getInstanceId();
|
||||||
|
InternalHooksManager.init(instanceId);
|
||||||
|
|
||||||
await Server.start();
|
await Server.start();
|
||||||
|
|
||||||
// Start to get active workflows and run their triggers
|
// Start to get active workflows and run their triggers
|
||||||
|
|
|
@ -18,6 +18,7 @@ import {
|
||||||
Db,
|
Db,
|
||||||
ExternalHooks,
|
ExternalHooks,
|
||||||
GenericHelpers,
|
GenericHelpers,
|
||||||
|
InternalHooksManager,
|
||||||
LoadNodesAndCredentials,
|
LoadNodesAndCredentials,
|
||||||
NodeTypes,
|
NodeTypes,
|
||||||
WebhookServer,
|
WebhookServer,
|
||||||
|
@ -147,6 +148,9 @@ export class Webhook extends Command {
|
||||||
// Wait till the database is ready
|
// Wait till the database is ready
|
||||||
await startDbInitPromise;
|
await startDbInitPromise;
|
||||||
|
|
||||||
|
const instanceId = await UserSettings.getInstanceId();
|
||||||
|
InternalHooksManager.init(instanceId);
|
||||||
|
|
||||||
if (config.get('executions.mode') === 'queue') {
|
if (config.get('executions.mode') === 'queue') {
|
||||||
const redisHost = config.get('queue.bull.redis.host');
|
const redisHost = config.get('queue.bull.redis.host');
|
||||||
const redisPassword = config.get('queue.bull.redis.password');
|
const redisPassword = config.get('queue.bull.redis.password');
|
||||||
|
|
|
@ -26,7 +26,7 @@ import {
|
||||||
IBullJobData,
|
IBullJobData,
|
||||||
IBullJobResponse,
|
IBullJobResponse,
|
||||||
IExecutionFlattedDb,
|
IExecutionFlattedDb,
|
||||||
IExecutionResponse,
|
InternalHooksManager,
|
||||||
LoadNodesAndCredentials,
|
LoadNodesAndCredentials,
|
||||||
NodeTypes,
|
NodeTypes,
|
||||||
ResponseHelper,
|
ResponseHelper,
|
||||||
|
@ -259,6 +259,9 @@ export class Worker extends Command {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
Worker.jobQueue.process(flags.concurrency, async (job) => this.runJob(job, nodeTypes));
|
Worker.jobQueue.process(flags.concurrency, async (job) => this.runJob(job, nodeTypes));
|
||||||
|
|
||||||
|
const instanceId = await UserSettings.getInstanceId();
|
||||||
|
InternalHooksManager.init(instanceId);
|
||||||
|
|
||||||
const versions = await GenericHelpers.getVersions();
|
const versions = await GenericHelpers.getVersions();
|
||||||
|
|
||||||
console.info('\nn8n worker is now ready');
|
console.info('\nn8n worker is now ready');
|
||||||
|
|
|
@ -312,8 +312,6 @@ class App {
|
||||||
this.frontendSettings.personalizationSurvey =
|
this.frontendSettings.personalizationSurvey =
|
||||||
await PersonalizationSurvey.preparePersonalizationSurvey();
|
await PersonalizationSurvey.preparePersonalizationSurvey();
|
||||||
|
|
||||||
InternalHooksManager.init(this.frontendSettings.instanceId);
|
|
||||||
|
|
||||||
await this.externalHooks.run('frontend.settings', [this.frontendSettings]);
|
await this.externalHooks.run('frontend.settings', [this.frontendSettings]);
|
||||||
|
|
||||||
const excludeEndpoints = config.get('security.excludeEndpoints') as string;
|
const excludeEndpoints = config.get('security.excludeEndpoints') as string;
|
||||||
|
|
Loading…
Reference in a new issue