Manually fetching jobs
import Queue from 'bull';
const queue = new Queue({
limiter: {
max: 5,
duration: 5000,
bounceBack: true // important
},
...queueOptions
});
queue.add({ random_attr: 'random_value' });const job: Job = await queue.getNextJob();const (nextJobData, nextJobId) = await job.moveToFailed(
{
message: 'Call to external service failed!',
},
true,
);Last updated
Was this helpful?