Single comment thread
See full discussion

You should try using a queue eg. Bull queue.
You can run the workers on the same server or somewhere else (it's backed by redis).
Not sure if it 100% fits your use case since as far as I understand you seem to want to wait for the job to complete before sending a response back or something? In which case you should wait on the output of the queued job (that writes to a db or something)

Bull looks like exactly what I need. I don't have redis setup for my project but shouldn't be too tough. Thanks dude!!! 🙌 Will let you know how it goes.

There's cool UIs to monitor the queues as well, I've got an example of a working setup at github.com/HugoDF/express-bul… (post explaining what's going on at codewithhugo.com/bring-redux-…).

Bull is the only queue with a modern interface (ie Promises) that I found when digging around.

Let me know if you get stuck anywhere.

Home
Search
Messages
Notifications
More