diff --git a/src/classes/job.ts b/src/classes/job.ts index 9e5bbc96c1..54cded1cb9 100644 --- a/src/classes/job.ts +++ b/src/classes/job.ts @@ -299,10 +299,12 @@ export class Job { command = 'failed'; } - const results = await multi.exec(); - const code = results[results.length - 1][1]; - if (code < 0) { - throw Scripts.finishedErrors(code, this.id, command); + if (!this.queue.closing) { + const results = await multi.exec(); + const code = results[results.length - 1][1]; + if (code < 0) { + throw Scripts.finishedErrors(code, this.id, command); + } } }