refactor(core): Suppress MaxListenersExceededWarning in the logs (#10077)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-07-16 18:20:55 +02:00
committed by GitHub
parent 48f047ee2e
commit 3bbeae47f3
2 changed files with 22 additions and 6 deletions

View File

@@ -320,11 +320,9 @@ export class Worker extends BaseCommand {
const envConcurrency = config.getEnv('executions.concurrency.productionLimit');
const concurrency = envConcurrency !== -1 ? envConcurrency : flags.concurrency;
Worker.jobQueue.setConcurrency(concurrency);
void Worker.jobQueue.process(
concurrency,
async (job) => await this.runJob(job, this.nodeTypes),
);
void Worker.jobQueue.process(async (job) => await this.runJob(job, this.nodeTypes));
Worker.jobQueue.getBullObjectInstance().on('global:progress', (jobId: JobId, progress) => {
// Progress of a job got updated which does get used