Is there a way to tell how many promises are pending in the whole app?
I am feeding records in batch mode to a database (with sequelize). Each insertion is a promise, the rate of requests is higher than the resolves so the number of pending promises is increasing.
What is a good approach to this? awaiting each insertion seems less efficient but I suspect that letting the pending promises grow will collapse eventually.
So far I'd like to know how many promises are pending globally to analyze the rate of growth and study possible solutions or get some ideas here.