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

fix: unlock job when moving it to delayed #2329

Merged

Conversation

papandreou
Copy link
Contributor

@papandreou papandreou commented Mar 21, 2022

Hi! For various reasons I'm using a rather high lockDuration setting in my app, and I noticed that jobs that fail an attempt and have to be moved to delayed remain locked. This means that I cannot easily remove such a job from our small homegrown queue control app, as it isn't the lock-taker.

When I tried to figure out what was going on, I noticed this comment:

bull/lib/job.js

Line 309 in 61a87a8

// If so, move to delayed (need to unlock job in this case!)

... However, it seems like the job isn't actually being unlocked by moveToDelayed-3, so I tried fixing that 😇

@papandreou papandreou changed the title fix: unlock job when moving it to the delayed queue fix: unlock job when moving it to delayed Mar 21, 2022
@papandreou papandreou force-pushed the fix/releaseLockAfterRemovingToDelayed branch from 2c18848 to 44b9651 Compare March 29, 2022 18:08
@papandreou
Copy link
Contributor Author

WDYT @manast? 🤗

@manast
Copy link
Member

manast commented Apr 21, 2022

Sorry for the late reply. Yes, you are right, this was working mostly out of luck, thanks for the fix.

@manast manast merged commit 11eae6b into OptimalBits:develop Apr 21, 2022
github-actions bot pushed a commit that referenced this pull request Apr 21, 2022
## [4.8.2](v4.8.1...v4.8.2) (2022-04-21)

### Bug Fixes

* unlock job when moving it to delayed ([#2329](#2329)) ([11eae6b](11eae6b))
@manast
Copy link
Member

manast commented Apr 21, 2022

🎉 This PR is included in version 4.8.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants