From 7c259185bcfe93ef748a209fe7da059ff9537ca3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 21 Nov 2018 05:26:48 +0900 Subject: [PATCH] Fix bug --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 20e1b1b306..3f0b21a44a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -224,7 +224,7 @@ async function getMongoDBVersion(db: Db): Promise { return (await db.admin().serverInfo()).version; } -async function spawnWorkers(limit: number) { +async function spawnWorkers(limit: number = Infinity) { const workers = Math.min(limit, os.cpus().length); Logger.info(`Starting ${workers} worker${workers === 1 ? '' : 's'}...`); await Promise.all([...Array(workers)].map(spawnWorker));