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 fbc87fc301545..08417cdf84fc2 100644 --- a/packages/gatsby-source-filesystem/src/create-remote-file-node.js +++ b/packages/gatsby-source-filesystem/src/create-remote-file-node.js @@ -6,7 +6,6 @@ const { isWebUri } = require(`valid-url`) const Queue = require(`better-queue`) const { createFileNode } = require(`./create-file-node`) -const getMaxFileLock = require(`./get-max-file-lock`) const cacheId = url => `create-remote-file-node-${url}` /******************** @@ -96,12 +95,6 @@ const queue = new Queue(pushToQueue, { concurrent: 200, }) -// Detetmine the max file descriptors on the users machine -// Then set the batch size to be 3/4 of that becuase the user -// will most likely have files open already -getMaxFileLock().then((max) => { - queue.concurrent = max * .75 -}) /** * @callback {Queue~queueCallback} diff --git a/packages/gatsby-source-filesystem/src/get-max-file-lock.js b/packages/gatsby-source-filesystem/src/get-max-file-lock.js deleted file mode 100644 index e7ab59fe1705b..0000000000000 --- a/packages/gatsby-source-filesystem/src/get-max-file-lock.js +++ /dev/null @@ -1,20 +0,0 @@ -const { spawn } = require(`child_process`) - -module.exports = function () { - return new Promise((resolve, reject) => { - const cp = spawn(`ulimit`, [`-n`]) - - let output = `` - cp.stdout.setEncoding(`utf8`) - - cp.stdout.on(`data`, data => output += data) - cp.stdout.on(`exit`, code => { - // If the ulimit command fails, or doesn't exist in the environment, - // fall back to a safe number - // This will most likely happen on Windows - if (code != 0) { resolve(256) } - - resolve(parseInt(output, 10)) - }) - }) -}