From c551f891d3493a0e2a34eb7aaae312de29d141a8 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 13 Mar 2019 09:03:53 -0500 Subject: [PATCH] chore(screenshot): slow down concurrent screenshot downloads (#17771) --- core/scripts/screenshot/ionic.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/scripts/screenshot/ionic.js b/core/scripts/screenshot/ionic.js index aae2ba22bd..7e349606cd 100644 --- a/core/scripts/screenshot/ionic.js +++ b/core/scripts/screenshot/ionic.js @@ -23,8 +23,10 @@ class IonicConnector extends ScreenshotConnector { return true }); - if (missingImages.length > 0) { - await Promise.all(missingImages.map(async image => { + while (missingImages.length > 0) { + const images = missingImages.splice(0, 20); + + await Promise.all(images.map(async image => { this.logger.debug(`downloading: ${image}`); try {