Closed fsfarah closed 7 years ago
If I guessed it correct, your are depending on two separate Kue instances with different prefixes in the same process, however createQueue
currently returns a singleton.
So you should run different prefixes in separate node.js processes.
I have a parent job creator and processor. When processing parent job, I need to create a child job. But this job has to be on a different Redis instance and a different prefix altogether. However when I try to add the new child job, it is being added on the parent's queue instead of the child's queue!
Here's the code:
Child Process
Child Create
Parent Process
Notice here how I create a new child job inside the process block
Parent Create
So in order to initiate I run the following
The problem is that I see the jobs from child and parent on the same queue with prefix
parent-test
instead of being separated intoparent-test
andchild-test
resulting in any child job to be stuck.However, if I rename all the queue prefixes to
test
it works like a charm.How can I fix this issue? Thanks