diff --git a/src/classes/job.ts b/src/classes/job.ts index 4e9dd3a75c..8fefc034f6 100644 --- a/src/classes/job.ts +++ b/src/classes/job.ts @@ -256,10 +256,10 @@ export class Job< new this(queue, job.name, job.data, job.opts, job.opts?.jobId), ); - const multi = client.multi(); + const pipeline = client.pipeline(); for (const job of jobInstances) { - job.addJob((multi as unknown), { + job.addJob((pipeline as unknown), { parentKey: job.parentKey, parentDependenciesKey: job.parentKey ? `${job.parentKey}:dependencies` @@ -267,7 +267,7 @@ export class Job< }); } - const results = (await multi.exec()) as [null | Error, string][]; + const results = (await pipeline.exec()) as [null | Error, string][]; for (let index = 0; index < results.length; ++index) { const [err, id] = results[index]; if (err) { diff --git a/src/classes/worker.ts b/src/classes/worker.ts index f3bce72c8a..e684a8aacf 100644 --- a/src/classes/worker.ts +++ b/src/classes/worker.ts @@ -1004,16 +1004,16 @@ will never work with more accuracy than 1ms. */ protected async extendLocks(jobs: Job[]) { try { - const multi = (await this.client).multi(); + const pipeline = (await this.client).pipeline(); for (const job of jobs) { await this.scripts.extendLock( job.id, job.token, this.opts.lockDuration, - multi, + pipeline, ); } - const result = (await multi.exec()) as [Error, string][]; + const result = (await pipeline.exec()) as [Error, string][]; for (const [err, jobId] of result) { if (err) {