Open ThanosDi opened 3 years ago
Maybe you could store you results to array and check if it meets conditions to stop the queue.
const results = [];
queue.on('completed', (result) => {
results.push(result);
if (shouldCancel(results)) {
queue.pause();
}
});
Is there a way to check the batch results (based on concurrency) to determine if the queue should continue?
For example I want to check 500 urls with concurrency 10 but I'd like to know each batch result to understand if I should keep going or not.