Tune worker/job counts (#5346)

* デフォルトのワーカー数を1に

* Tune default job count
This commit is contained in:
MeiMei
2019-08-27 05:33:24 +09:00
committed by syuilo
parent ab6a84cd45
commit 6a0affcec1
4 changed files with 11 additions and 4 deletions

View File

@ -159,7 +159,7 @@ async function init(): Promise<Config> {
return config;
}
async function spawnWorkers(limit: number = Infinity) {
async function spawnWorkers(limit: number = 1) {
const workers = Math.min(limit, os.cpus().length);
bootLogger.info(`Starting ${workers} worker${workers === 1 ? '' : 's'}...`);
await Promise.all([...Array(workers)].map(spawnWorker));