Skip to content

Commit

Permalink
fix: do not exec if closing
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Sep 1, 2019
1 parent 74cf2d2 commit b1d1c08
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/classes/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit b1d1c08

Please sign in to comment.