Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause -> Retry failed -> Resume leads to retried waiting jobs getting stuck. #2540

Closed
levysam opened this issue Feb 6, 2023 · 2 comments
Closed
Assignees
Labels

Comments

@levysam
Copy link

levysam commented Feb 6, 2023

Description

these are the steps that reproduced the issue:

I had a queue that was processing 2 jobs at a time. There were, say 5 failed jobs and 10 jobs in 'Waiting' state.

I am using Bull Master, that shows a 'Stuck' state if I access the job by ID.
Unfortunately there appears to be no direct way to find these Stuck jobs so I may restart them/reschedule them - which would have been a workaround. :(

  1. Pause the queue and wait for currently processing jobs to complete.
  2. Result: 10 jobs go from 'Waiting' to 'Paused' state.
  3. Retry failed jobs
  4. Result: 2 jobs start being processed, remaining 3 jobs of the 5 go to 'Waiting' state.
  5. 10 jobs remain in 'Paused' state.
  6. Unpause the queue:
  7. Expected: There should be 10 + 3 = 13 jobs in 'Waiting' state.
  8. Actual: There are 10 jobs in 'Waiting' state. The original 3 retried jobs are in a stuck state.

you can reproduce the bug easily following the readme of this project: https://github.com/levysam/bull-bug-scripts

Bull version

4.10.3

@manast manast self-assigned this Feb 7, 2023
@manast manast added the bug label Feb 7, 2023
@manast
Copy link
Member

manast commented Feb 7, 2023

There is a bug in that retry is not taking into consideration the queue status (waiting or paused).

@manast
Copy link
Member

manast commented Feb 9, 2023

Fixed here #2549

@manast manast closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants