I am creating jobs using Kue.
jobs.create('myQueue', { 'title':'test', 'job_id': id ,'params': params } )
.delay(milliseconds)
.removeOnComplete( true )
.save(function(err) {
if (err) {
console.log( 'jobs.create.err', err );
}
});
Every job has a delay time, and normally it is 3 hours.
Now I will to check every incoming request that wants to create a new job and get the id .
As you can see from the above code, when I am creating a job I will add the job id to the job.
So now I want to check the incoming id with the existing jobs' job_id s in the queue and update that existing job with the new parameters if a matching id found.
So my job queue will have unique job_id every time :).
Is it possible? I have searched a lot, but no help found. I checked the kue JSON API. but it only can create and get retrieve jobs, can not update existing records.