Open Jayshri-Intlon opened 5 months ago
There is almost no data regarding this issue with is very strange!
Not sure what the issue is here. So, a job that is not keeping the event loop busy will not have any issues, you should not change the lockDuration setting unless you are very aware of why you need to do it. Most likely what you need to do is make sure your job is not keeping the event loop busy for more than a few milliseconds. This is documented in several places, also it is a standard NodeJS good practice: https://blog.searchmyexpert.com/nodejs-event-loop/
Issue:
In my project, I have a job queue named 'entityCreateQueue' that runs periodically to complete certain tasks within a specific timeframe. However, I've noticed that sometimes it generates duplicates shortly after completing a task. To address this issue, I've encountered recommendations to set a 'lockDuration' with a larger value and a 'maxStalledCount' to 0, as mentioned in the references I've consulted. However, I'm uncertain about where and how to configure these settings within my Bull queue in the Nest JS application.
Reference:
Code snippet