moleculerjs/moleculer-addons

Is this correct pattern for adding jobs via actions

rishighan opened this issue · 1 comments

Hello, I added moleculer-bull to serve as a MQ for my application.
It is currently a part of a microservice.

My question is around what the correct pattern is to add a job to the queue.
Right now, my flow is this:

UI triggers a API request --- payload ---> action in microservice --- payload ---> add to queue -- complete --> respond with the result of the job back to UI

The code in question: https://github.com/rishighan/threetwo-import-service/blob/master/services/import.service.ts
The repo for the microservice: https://github.com/rishighan/threetwo-import-service

I found the answer through this #48 !
Thanks @icebob, even in issues you solve other people's problems!