taskforcesh / bullmq

BullMQ - Message Queue and Batch processing for NodeJS and Python based on Redis
https://bullmq.io
MIT License
5.73k stars 373 forks source link

Get repeatable job by job key #1977

Open ElFisherMan opened 1 year ago

ElFisherMan commented 1 year ago

We are trying to be as much resilient as possible and to allow re-registering jobs (from mongoDB backup we keep since our redis can fail and we need to make sure we can recover from this).

Our solution is to have a re-registering code when redis is UP again. So we want to go over each job we kept in mongo collection backup and ask if it already exists in BullMQ.

But we can only get all the repeatable jobs and can't fetch them by job key.

We do see that there is a removeRepeatableByKey function so we want to be able to fetch a repeatable job by key. Can you please add this ability?

geeksilva97 commented 1 year ago

I can work on a pr if that makes sense.