diff --git a/utils/jobsExceedingAttemptsFilter.js b/utils/jobsExceedingAttemptsFilter.js index dcaaa42..531e863 100644 --- a/utils/jobsExceedingAttemptsFilter.js +++ b/utils/jobsExceedingAttemptsFilter.js @@ -1 +1 @@ -module.exports = jobs => jobs.filter(job => !job || typeof job !== 'object' || job.attemptsMade <= job.opts.attempts) +module.exports = jobs => jobs.filter(job => job && typeof job === 'object' && job.attemptsMade > job.opts.attempts)