Replies: 1 comment
-
I figured out I'm doing it wrong after reading the docs again. In fact I added 2 workers to my queue. And when I add a job the first worker available processes the job. Hence, the reason why sometimes I get an Id sometimes I don't. But is it possible to tell a worker to process jobs with a specific job name? 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm experiencing an inconsistent behavior with BullMQ where the ID returned from a createPost job sometimes returns null when the 'deletePost' job is commented out in my Node.js application. When I comment the 'deletePost' job, it works as expected, returning the created post ID every time a request is sent.
Here is my controller class
Here is my PostMQ class
The worker class
This is the BaseMQ parent class
On the below images you can see that for the same request some times the create post service is called and some times it isn't. What's weird and that I can't figure out is that this only happens if the delete worker is added. That is when I call the process job function like this
I'm still on a learning curve of BullMQ 🙏🏽
I'm using the following versions:
Has anyone encountered a similar issue or can provide insight into what might be causing this behavior?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions