Default to worker count = 2

pull/60/head
HardiReady 2019-10-01 11:40:05 +02:00
parent af2a8882af
commit 8b20eab3b5
1 changed files with 1 additions and 2 deletions

View File

@ -19,8 +19,7 @@ const {exec} = require('child_process');
// cluster mode // cluster mode
const cluster = require('cluster'); const cluster = require('cluster');
const envWorkerNum = process.env.NODE_WORKER_COUNT; const envWorkerNum = process.env.NODE_WORKER_COUNT;
const cpuCount = require('os').cpus().length; const numWorkers = (envWorkerNum) ? envWorkerNum : 2;
const numWorkers = (envWorkerNum) ? envWorkerNum : cpuCount;
// own modules // own modules
const config = require('./config/config'); const config = require('./config/config');