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

worker.getNextJob timeout #3060

Open
y-nk opened this issue Feb 6, 2025 · 1 comment
Open

worker.getNextJob timeout #3060

y-nk opened this issue Feb 6, 2025 · 1 comment

Comments

@y-nk
Copy link

y-nk commented Feb 6, 2025

Is your feature request related to a problem? Please describe.

The current worker.getNextJob is either blocking (default) or non-blocking. the problem is that the blocking version does not have a configurable timeout to release the lock. if we await for this, it'll be forever

Describe the solution you'd like
a timeout option for when block is true

Describe alternatives you've considered
passing block: false and harassing the server in a loop with await setTimeout in between to tame the worker

@manast
Copy link
Contributor

manast commented Feb 7, 2025

There is actually a timeout which is by default 10 seconds: https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html#drainDelay

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

No branches or pull requests

2 participants