From cada108ce0fb6cdb3344e37403194439e50f6492 Mon Sep 17 00:00:00 2001 From: Sergei Zherevchuk Date: Mon, 6 Dec 2021 18:45:00 +0300 Subject: [PATCH] fix(gatsby-source-filesystem): Ensure fastq concurrency parameter of the correct type (#34186) --- .../gatsby-source-filesystem/src/create-remote-file-node.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-source-filesystem/src/create-remote-file-node.js b/packages/gatsby-source-filesystem/src/create-remote-file-node.js index 9696b65fc5ea2..5bd4bcaec4e86 100644 --- a/packages/gatsby-source-filesystem/src/create-remote-file-node.js +++ b/packages/gatsby-source-filesystem/src/create-remote-file-node.js @@ -46,7 +46,11 @@ let showFlagWarning = !!process.env.GATSBY_EXPERIMENTAL_REMOTE_FILE_PLACEHOLDER * Queue Management * ********************/ -const queue = Queue(pushToQueue, process.env.GATSBY_CONCURRENT_DOWNLOAD || 200) +const GATSBY_CONCURRENT_DOWNLOAD = process.env.GATSBY_CONCURRENT_DOWNLOAD + ? parseInt(process.env.GATSBY_CONCURRENT_DOWNLOAD, 10) || 0 + : 200 + +const queue = Queue(pushToQueue, GATSBY_CONCURRENT_DOWNLOAD) /** * @callback {Queue~queueCallback}