We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe.
My CPU intensive jobs would do "correct" work, but they stall with errors:
async checkStaleCreatives(): Promise<any> { // Keep busy const startTime = Date.now(); while (Date.now() - startTime < 30000) { // Spin } }
Describe the solution you'd like
I'd like a way to tell BullMQ that my job is still working correctly. So that my job is not considered stalled.
await job.notifyNotStalled() or await queue.notifyNotStalled()
AND/OR the snippet below (or a better fix) should be in the documentation about stalled jobs so people know how to prevent the stalls
Describe alternatives you've considered
Adding this in the CPU intensive loop solves my problem
// Yield to the event loop to avoid stalls await new Promise((resolve) => setTimeout(resolve));
The text was updated successfully, but these errors were encountered:
hi @maxime-dupuis sorry for the delay. Looks like we need to improve our docs a little bit. We have these extra options available in Worker class https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html#lockDuration and https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html#lockRenewTime that you can increase. You can make some tries to check which values work for your use cases.
Sorry, something went wrong.
lockDuration
Thanks, I think it might be useful sometimes if the expected duration is known.
In our case, the "yielding" trick works best for us because
No branches or pull requests
Is your feature request related to a problem? Please describe.
My CPU intensive jobs would do "correct" work, but they stall with errors:
Describe the solution you'd like
I'd like a way to tell BullMQ that my job is still working correctly. So that my job is not considered stalled.
AND/OR the snippet below (or a better fix) should be in the documentation about stalled jobs so people know how to prevent the stalls
Describe alternatives you've considered
Adding this in the CPU intensive loop solves my problem
The text was updated successfully, but these errors were encountered: