I'm using the great NodeJS Agenda task scheduler (https://github.com/agenda/agenda) to schedule background jobs in my Node/Express app.
Agenda can also run in a Node Cluster configuration, however I'm running into a problem with that (maybe I overlooked something because this seems pretty basic).
So I've used the code example from the README (https://github.com/agenda/agenda#spawning--forking-processes) to set up a cluster with N workers, each worker (Node cluster process) has an agenda instance.
Now suppose I have 2 workers (processes) and I call "agenda.now()" from worker 1, then it can be picked up (processed) by any of the 2 workers, because all of them are monitoring the queue, right?
However I always see the job being picked up by the first worker, the other one(s) aren't picking up the job.
What am I overlooking? All the workers should be monitoring the queue so all of them should be picking up jobs.