1

Hi so i'm using the priority scheduler Kue https://github.com/Automattic/kue

What I need is the scheduler to process one job at a time based on the project name. So the code should look something similar to

jobs.create(item.project.name); //Adding a job to the queue

jobs.process(item.project.name, 1, function ( job, done ){
  //Processing the job here
});

The problem is I don't know the name until the users makes a post request

router.post('/add-to-queue',req,res)

And processing and saving in the same function does not work.

Any help would be greatly appreciated.

rodrigoap
  • 7,405
  • 35
  • 46
Sam
  • 651
  • 5
  • 5
  • So, basically the name of the queue is dynamic, right? You need a queue to send the dynamic queue names `item.project.name`and then generic workers connected on the other end connecting to the name received in the message. – rodrigoap Jul 18 '18 at 01:47

0 Answers0