Skip to content

fix(gatsby-source-filesystem): Ensure fastq concurrency parameter of the correct type - #34186

Merged
LekoArts merged 1 commit into
gatsbyjs:masterfrom
pacahon:fix/gatsby-source-filesystem
Dec 6, 2021
Merged

fix(gatsby-source-filesystem): Ensure fastq concurrency parameter of the correct type#34186
LekoArts merged 1 commit into
gatsbyjs:masterfrom
pacahon:fix/gatsby-source-filesystem

Conversation

@pacahon

@pacahon pacahon commented Dec 3, 2021

Copy link
Copy Markdown
Contributor

Description

fastq implementation uses strict equality for queue concurrency parameter: https://github.com/mcollina/fastq/blob/3b9f23d8bcf2d9399fc2095d77ded7285c35128a/queue.js#L99

That's why process.env.GATSBY_CONCURRENT_DOWNLOAD must be converted to integer. If parseInt returns NaN fallback user value to 0 to throw validation error on queue initialization.

Documentation

Related Issues

@gatsbot gatsbot Bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 3, 2021
@LekoArts LekoArts added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 6, 2021

@LekoArts LekoArts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LekoArts
LekoArts merged commit cada108 into gatsbyjs:master Dec 6, 2021
mwfrost pushed a commit to mwfrost/gatsby that referenced this pull request Apr 20, 2023
raffishquartan pushed a commit to raffishquartan/gatsby that referenced this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants