If you try adding multiple jobs for the same processor, then the jobs are getting added but not processed. Most of the time only one of added jobs gets processed. I want all the added jobs to be processed, I even tried with delay, but still the problem persists.
const recipients = ['9988998899', '6677887766'];
for (const recipient of recipients) {
data.recipient = recipient;
const job = await this.bsQueue.add('send-push', data);
this.logger.debug(`Job whatsapp push with id: ${job.id} added!`);
}
Try adding a unique
jobId
https://github.com/taskforcesh/bullmq/issues/488#issuecomment-825774630