Skip to content

Commit 4658b80

Browse files
wardpeetLekoArts
andauthoredOct 13, 2021
fix(gatsby-plugin-sharp): run sharp in 1 core when in gatsby worker (#33505)
Co-authored-by: Lennart <lekoarts@gmail.com>
1 parent 7fd98e3 commit 4658b80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/gatsby-plugin-sharp/src/gatsby-worker.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ const q = queue(
3232
args.pluginOptions
3333
)
3434
),
35-
Math.max(1, cpuCoreCount() - 1)
35+
// When inside query workers, we only want to use the current core
36+
process.env.GATSBY_WORKER_POOL_WORKER ? 1 : Math.max(1, cpuCoreCount() - 1)
3637
)
3738

3839
/**

0 commit comments

Comments
 (0)
Please sign in to comment.