mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 13:39:44 -08:00
refactor: Add log messages to debug worker init issues (#7238)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
parent
169175080a
commit
5cfd87692f
|
@ -213,10 +213,15 @@ export class Start extends BaseCommand {
|
||||||
this.activeWorkflowRunner = Container.get(ActiveWorkflowRunner);
|
this.activeWorkflowRunner = Container.get(ActiveWorkflowRunner);
|
||||||
|
|
||||||
await this.initLicense();
|
await this.initLicense();
|
||||||
|
this.logger.debug('License init complete');
|
||||||
await this.initBinaryDataService();
|
await this.initBinaryDataService();
|
||||||
|
this.logger.debug('Binary data service init complete');
|
||||||
await this.initExternalHooks();
|
await this.initExternalHooks();
|
||||||
|
this.logger.debug('External hooks init complete');
|
||||||
await this.initExternalSecrets();
|
await this.initExternalSecrets();
|
||||||
|
this.logger.debug('External secrets init complete');
|
||||||
this.initWorkflowHistory();
|
this.initWorkflowHistory();
|
||||||
|
this.logger.debug('Workflow history init complete');
|
||||||
|
|
||||||
if (!config.getEnv('endpoints.disableUi')) {
|
if (!config.getEnv('endpoints.disableUi')) {
|
||||||
await this.generateStaticAssets();
|
await this.generateStaticAssets();
|
||||||
|
|
|
@ -85,6 +85,7 @@ export class Webhook extends BaseCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.initCrashJournal();
|
await this.initCrashJournal();
|
||||||
|
this.logger.debug('Crash journal initialized');
|
||||||
|
|
||||||
this.logger.info('Initializing n8n webhook process');
|
this.logger.info('Initializing n8n webhook process');
|
||||||
this.logger.debug(`Queue mode id: ${this.queueModeId}`);
|
this.logger.debug(`Queue mode id: ${this.queueModeId}`);
|
||||||
|
@ -92,9 +93,13 @@ export class Webhook extends BaseCommand {
|
||||||
await super.init();
|
await super.init();
|
||||||
|
|
||||||
await this.initLicense();
|
await this.initLicense();
|
||||||
|
this.logger.debug('License init complete');
|
||||||
await this.initBinaryDataService();
|
await this.initBinaryDataService();
|
||||||
|
this.logger.debug('Binary data service init complete');
|
||||||
await this.initExternalHooks();
|
await this.initExternalHooks();
|
||||||
|
this.logger.debug('External hooks init complete');
|
||||||
await this.initExternalSecrets();
|
await this.initExternalSecrets();
|
||||||
|
this.logger.debug('External seecrets init complete');
|
||||||
}
|
}
|
||||||
|
|
||||||
async run() {
|
async run() {
|
||||||
|
|
|
@ -263,13 +263,19 @@ export class Worker extends BaseCommand {
|
||||||
await super.init();
|
await super.init();
|
||||||
|
|
||||||
await this.initLicense();
|
await this.initLicense();
|
||||||
|
this.logger.debug('License init complete');
|
||||||
await this.initBinaryDataService();
|
await this.initBinaryDataService();
|
||||||
|
this.logger.debug('Binary data service init complete');
|
||||||
await this.initExternalHooks();
|
await this.initExternalHooks();
|
||||||
|
this.logger.debug('External hooks init complete');
|
||||||
await this.initExternalSecrets();
|
await this.initExternalSecrets();
|
||||||
|
this.logger.debug('External secrets init complete');
|
||||||
await this.initEventBus();
|
await this.initEventBus();
|
||||||
|
this.logger.debug('Event bus init complete');
|
||||||
await this.initRedis();
|
await this.initRedis();
|
||||||
|
this.logger.debug('Redis init complete');
|
||||||
await this.initQueue();
|
await this.initQueue();
|
||||||
|
this.logger.debug('Queue init complete');
|
||||||
}
|
}
|
||||||
|
|
||||||
async initEventBus() {
|
async initEventBus() {
|
||||||
|
@ -315,8 +321,13 @@ export class Worker extends BaseCommand {
|
||||||
|
|
||||||
const redisConnectionTimeoutLimit = config.getEnv('queue.bull.redis.timeoutThreshold');
|
const redisConnectionTimeoutLimit = config.getEnv('queue.bull.redis.timeoutThreshold');
|
||||||
|
|
||||||
|
this.logger.debug(
|
||||||
|
`Opening Redis connection to listen to messages with timeout ${redisConnectionTimeoutLimit}`,
|
||||||
|
);
|
||||||
|
|
||||||
const queue = Container.get(Queue);
|
const queue = Container.get(Queue);
|
||||||
await queue.init();
|
await queue.init();
|
||||||
|
this.logger.debug('Queue singleton ready');
|
||||||
Worker.jobQueue = queue.getBullObjectInstance();
|
Worker.jobQueue = queue.getBullObjectInstance();
|
||||||
void Worker.jobQueue.process(flags.concurrency, async (job) =>
|
void Worker.jobQueue.process(flags.concurrency, async (job) =>
|
||||||
this.runJob(job, this.nodeTypes),
|
this.runJob(job, this.nodeTypes),
|
||||||
|
|
Loading…
Reference in a new issue