Skip to content

Commit

Permalink
fix(job-queue-plugin): Correctly filter BullMQ jobs by isSettled
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Oct 5, 2021
1 parent 9c544bf commit 2f24a33
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy {
}
const settledFilter = options?.filter?.isSettled;
if (settledFilter?.eq != null) {
jobTypes = settledFilter.eq === true ? ['completed', 'failed'] : ['wait', 'active', 'repeat'];
jobTypes =
settledFilter.eq === true
? ['completed', 'failed']
: ['wait', 'waiting-children', 'active', 'repeat', 'delayed', 'paused'];
}
let items: Bull.Job[] = [];
let jobCounts: { [index: string]: number } = {};
Expand Down

0 comments on commit 2f24a33

Please sign in to comment.