I've an array of millions of elements to save in a database and I want to run those queries in parallel with a concurrency of 1000. I also would like to stop the entire execution if one of those queries fails. However, when is set concurrency: 1000 together with stopOnError: true, the process stops only when all the 1000 promises are resolved (even though the first one fails)
I cannot share my code but it might be tested using the sample from the readme in this way:
I've an array of millions of elements to save in a database and I want to run those queries in parallel with a concurrency of 1000. I also would like to stop the entire execution if one of those queries fails. However, when is set
concurrency: 1000
together withstopOnError: true
, the process stops only when all the 1000 promises are resolved (even though the first one fails)I cannot share my code but it might be tested using the sample from the readme in this way:
Invalid url should throw an error and stop the execution of the other in pending urls