mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
limit build concurrency
This commit is contained in:
parent
0b5824a765
commit
f9c4f8bfb2
@ -57,10 +57,10 @@ async function buildFixture(name) {
|
||||
}
|
||||
|
||||
async function run() {
|
||||
const cpuCount = cpus().length
|
||||
const concurrency = Math.min(4, cpus().length)
|
||||
|
||||
spinner.info('Builing with concurrency of ' + cpuCount)
|
||||
const limit = pLimit(cpuCount)
|
||||
spinner.info('Builing with concurrency of ' + concurrency)
|
||||
const limit = pLimit(concurrency)
|
||||
|
||||
await Promise.all(fixtures.map(fixture =>
|
||||
limit(() => buildFixture(fixture))))
|
||||
|
Loading…
Reference in New Issue
Block a user