Skip to content

Commit 90aa247

Browse files
violyDSchau
authored andcommitted
feat(gatsby-source-filesystem): add an environment variable to control concurrent queue size (#13110)
1 parent 159d1d5 commit 90aa247

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/gatsby-source-filesystem/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ They will be added to the following default list:
6262
../**/dist/**
6363
```
6464

65+
To prevent concurrent requests overload of `processRemoteNode`, you can adjust the `200` default concurrent downloads, with `GATSBY_CONCURRENT_DOWNLOAD` environment variable.
66+
6567
## How to query
6668

6769
You can query file nodes like the following:

packages/gatsby-source-filesystem/src/create-remote-file-node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const createFilePath = (directory, filename, ext) =>
8181
const queue = new Queue(pushToQueue, {
8282
id: `url`,
8383
merge: (old, _, cb) => cb(old),
84-
concurrent: 200,
84+
concurrent: process.env.GATSBY_CONCURRENT_DOWNLOAD || 200,
8585
})
8686

8787
/**

0 commit comments

Comments
 (0)