feat(core): Remove all floating promises. Enforce @typescript-eslint/no-floating-promises (#6281)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-05-24 00:01:45 +00:00
committed by GitHub
parent 5d2f4746ea
commit e046f656fe
33 changed files with 94 additions and 120 deletions

View File

@@ -51,8 +51,7 @@ export class Worker extends BaseCommand {
LoggerProxy.info('Stopping n8n...');
// Stop accepting new jobs
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Worker.jobQueue.pause(true);
await Worker.jobQueue.pause(true);
try {
await this.externalHooks.run('n8n.stop', []);
@@ -239,8 +238,9 @@ export class Worker extends BaseCommand {
const queue = Container.get(Queue);
await queue.init();
Worker.jobQueue = queue.getBullObjectInstance();
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Worker.jobQueue.process(flags.concurrency, async (job) => this.runJob(job, this.nodeTypes));
void Worker.jobQueue.process(flags.concurrency, async (job) =>
this.runJob(job, this.nodeTypes),
);
this.logger.info('\nn8n worker is now ready');
this.logger.info(` * Version: ${N8N_VERSION}`);