Skip to content

Commit

Permalink
feat(gatsby-source-filesystem): add an environment variable to contro…
Browse files Browse the repository at this point in the history
…l concurrent queue size (#13110)
  • Loading branch information
violy authored and DSchau committed May 31, 2019
1 parent 159d1d5 commit 90aa247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/gatsby-source-filesystem/README.md
Expand Up @@ -62,6 +62,8 @@ They will be added to the following default list:
../**/dist/**
```

To prevent concurrent requests overload of `processRemoteNode`, you can adjust the `200` default concurrent downloads, with `GATSBY_CONCURRENT_DOWNLOAD` environment variable.

## How to query

You can query file nodes like the following:
Expand Down
Expand Up @@ -81,7 +81,7 @@ const createFilePath = (directory, filename, ext) =>
const queue = new Queue(pushToQueue, {
id: `url`,
merge: (old, _, cb) => cb(old),
concurrent: 200,
concurrent: process.env.GATSBY_CONCURRENT_DOWNLOAD || 200,
})

/**
Expand Down

0 comments on commit 90aa247

Please sign in to comment.