Skip to content

Commit

Permalink
Return count not result.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Michalski committed Jul 28, 2020
1 parent ffbe880 commit 5e30523
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clean_failed_job_stacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ forEach(args, async (name, index) => {
const jobs = await queue.getFailed()
const retriedJobCount = await reduce(jobs, async (count, job) => {
if (job.attemptsMade <= job.opts.attempts) {
return result
return count
}
const { id, data, opts } = job
opts.jobId = id
Expand Down
2 changes: 1 addition & 1 deletion retry_failed_jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ forEach(args, async (name, index) => {
const jobs = await queue.getFailed()
const retriedJobCount = await reduce(jobs, async (count, job) => {
if (job.attemptsMade > MAX_FAILED_COUNT) {
return result
return count
}
try {
await job.retry()
Expand Down

0 comments on commit 5e30523

Please sign in to comment.