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

[Bug]: Queue.clean on delayed job is not working #2124

Closed
1 task done
felixmosh opened this issue Aug 8, 2023 · 4 comments · Fixed by #2133
Closed
1 task done

[Bug]: Queue.clean on delayed job is not working #2124

felixmosh opened this issue Aug 8, 2023 · 4 comments · Fixed by #2133
Labels
bug Something isn't working

Comments

@felixmosh
Copy link

felixmosh commented Aug 8, 2023

Version

v4.x.0

Platform

NodeJS

What happened?

Cleaning all delayed jobs is not working, it returns an empty array (which should contain removed job ids).

Related to felixmosh/bull-board#615

How to reproduce.

  1. Create a job with a delay of 1 min
  2. Call queue.clean(500, 1000, 'delayed') on the queue after few secs.
  3. Nothing happens, the waiting job is still in the queue, an empty array returned.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@manast
Copy link
Contributor

manast commented Aug 8, 2023

I think this works as designed actually, has to do with the grace period: https://github.com/taskforcesh/bullmq/blob/master/tests/test_clean.ts#L202

@felixmosh
Copy link
Author

felixmosh commented Aug 8, 2023

Thank you for the quick reply, I've tried setting the grace period to 0, didn't help, the job is remains there.

@manast
Copy link
Contributor

manast commented Aug 9, 2023

Can you write a test case that does not pass? this one does:
https://github.com/taskforcesh/bullmq/blob/master/tests/test_clean.ts#L192C2-L200

@felixmosh
Copy link
Author

#2130

github-actions bot pushed a commit that referenced this issue Sep 20, 2023
## [4.11.1](v4.11.0...v4.11.1) (2023-09-20)

### Bug Fixes

* **queue:** differentiate score purpose per state in clean method ([#2133](#2133)) fixes [#2124](#2124) ([862f10b](862f10b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants