Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.45k stars 862 forks source link

Cuctom id's for jobs #1168

Open abhisek1318 opened 6 years ago

abhisek1318 commented 6 years ago

How to add custom id to jobs ?

mrfoh commented 6 years ago

@abhisek1318 Hello did you find a way to do this yet? Also looking for a way to set custom Ids for jobs

abhisek1318 commented 6 years ago

@mrfoh You can use the unique key to set a unique id instead of a custom id. And then use the remove feature to remove id that matches the unique key. What do you plan on using kue for ?

mrfoh commented 6 years ago

I want to use it as a job queue

Best Regards Patrick Foh

On 13 Apr 2018, 13:19 +0100, abhisek1318 notifications@github.com, wrote:

@mrfoh You can use the unique key to set a unique id instead of a custom id. And then use the remove feature to remove id that matches the unique key. What do you plan on using kue for ? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

AxelJunker commented 5 years ago

@abhisek1318 Could you expand on how to set a unique id, please?

fredvollmer commented 5 years ago

It would be great to be able to use deterministic/predictable keys, set via a custom id, so that then a job can be removed without needing to know the random/unique id...

shahidmau commented 3 years ago

Yes, it is a must-have feature. We can do it in bee-queue library by using setId function.