I am building a system that monitors the queue and activates a set of tasks on a regular interval.
I am interested in starting multiple instances of my processing of "bots" depending on the number of items in the queue. So, if there are 5 items, I launched two bots, and if there are 10, I will launch four.
I know how to run multiple instances from the CLI (manually), but how do I do this as a function of my application? And how would I correctly track the creation and destruction of these bots?
source
share