mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 18:01:51 +08:00
Hoping this will fix this: https://app.circleci.com/pipelines/github/storybookjs/storybook/75841/workflows/a547be3c-f39c-456d-8d28-43851549667b/jobs/654395
11 lines
311 B
TypeScript
11 lines
311 B
TypeScript
import os from 'os';
|
|
|
|
/**
|
|
* The maximum number of concurrent tasks we want to have on some CLI and CI tasks.
|
|
* The amount of CPUS minus one, arbitrary limited to 15 to not overload CI executors.
|
|
*/
|
|
export const maxConcurrentTasks = Math.min(
|
|
Math.max(1, os.cpus().length - 1),
|
|
process.env.CI ? 5 : 15
|
|
);
|