bull icon indicating copy to clipboard operation
bull copied to clipboard

jobId same name Different add queue

Open ValueLan opened this issue 3 years ago • 4 comments

Minimal, Working Test code to reproduce the issue.

` queue.add('nameAAA', { }, { removeOnComplete: true, removeOnFail: true, jobId: 1 });

queue.add('nameBBB', { }, { removeOnComplete: true, removeOnFail: true, jobId: 1 }); // I hope different names should be added success, But add fail. I can give jobId add pre, But it's too much trouble `

Bull version 4.8.4

ValueLan avatar Jul 26 '22 09:07 ValueLan

What is the issue exactly?

manast avatar Jul 28 '22 15:07 manast

Queue add same jobId but different name , only add a job. Name like db table name , Id like db table id. Different table add same jobId should add tow jobs.

ValueLan avatar Jul 29 '22 05:07 ValueLan

By design jobs with the same Id as existing jobs in the queue are ignored.

manast avatar Aug 01 '22 10:08 manast

The function feels better if you use name + jobId to distinguish tasks.

ValueLan avatar Aug 10 '22 09:08 ValueLan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 09 '22 19:10 stale[bot]