How to implement queue in a nodejs cli app?

Viewed 28

I am trying to do something and I am not finding the way. I have a cli app in nodeJS. This application must run, and in its execution my intention is that it can launch some processes (in a queue), but not wait for the response of said processes.

I have tried it with bee-queue but when I do the main app (cli app), it is frozen, and it never finishes its execution.

Is there a way to get it with bee-queue?

In summary what I need is:

  • Run a nodeJS cli app
  • The cli app runs and queues a number of processes
  • The cli app terminates (and the processes continue to do their work)
1 Answers

Consider using the child process module instead of a queue.

This way you'll be able to run the processes in the background and you'll also have the ability to control or handle the responses from the processes.

This is a nice summery of the usage

Related