You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application I have a bunch of jobs that run through the hour and then at the end of the hour we queue the next hour of jobs using the delay option
However when the QueueScheduler restarts it won't process the delay
Here's an example
const{ QueueScheduler, Queue, Worker }=require("bullmq");constscheduler=newQueueScheduler("test");functionQueueJobs(){constqueue=newQueue("test");constarr=newArray(3600);constinterval=3600000/arr.length;// should be 360000/3600 = 1000msarr.forEach((item,i)=>{constdelay=Math.floor((i+1)*interval);// this should equal 1000, then 2000, then 3000, delaying a job every secondqueue.add("test",{ delay },{ delay });});}(async()=>{awaitscheduler.waitUntilReady();QueueJobs();// Jobs run every second as intended})();//After we run above code, wait a few seconds and run:const{ QueueScheduler, Queue, Worker }=require("bullmq");constscheduler=newQueueScheduler("test");(async()=>{awaitscheduler.waitUntilReady();//Expected old jobs to continue running every second but they do not.})();
The text was updated successfully, but these errors were encountered:
In my application I have a bunch of jobs that run through the hour and then at the end of the hour we queue the next hour of jobs using the delay option
However when the QueueScheduler restarts it won't process the delay
Here's an example
The text was updated successfully, but these errors were encountered: