Whats the quickest way to iterate through failed Bull.js jobs and delete them properly?

481 views Asked by At

I have a problem with my video upload pipeline getting stalled and users looking at a "waiting" notification all the time. It is a video upload pipeline that converts the videos with ffmpeg and uploads to AWS. It seems that there are failed/stuck jobs in Bull.js and Im wondering the best way to delete them.

I have a setInterval function getting all jobs like so let j = await videoQueue.getJobs();. If iterate through each job in a loop, do I need to find the job in redis to remove it or do I just kill the job itself somehow? The job has a property: _progress: 'undefined;conversion error' which is specific to my application's error codes. Just... how do I get rid of the job peacefully to free it up for other jobs?

0

There are 0 answers