Skip to content

Commit

Permalink
fix: default to concurrency 1 in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Dec 20, 2023
1 parent f6226a7 commit f0750cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,18 @@ export async function everyMonorepoProject (projectDir, fn, opts) {
inDegree.set(name, project.siblingDependencies.length)
}

let concurrency = opts?.concurrency

if (concurrency == null && process.env.CI != null) {
concurrency = 1
}

if (concurrency == null) {
concurrency = os.availableParallelism?.() ?? os.cpus().length
}

const queue = new PQueue({
concurrency: opts?.concurrency ?? os.availableParallelism?.() ?? os.cpus().length
concurrency
})

while (inDegree.size) {
Expand Down

0 comments on commit f0750cb

Please sign in to comment.