Default to worker count = 2
parent
af2a8882af
commit
8b20eab3b5
|
@ -19,8 +19,7 @@ const {exec} = require('child_process');
|
|||
// cluster mode
|
||||
const cluster = require('cluster');
|
||||
const envWorkerNum = process.env.NODE_WORKER_COUNT;
|
||||
const cpuCount = require('os').cpus().length;
|
||||
const numWorkers = (envWorkerNum) ? envWorkerNum : cpuCount;
|
||||
const numWorkers = (envWorkerNum) ? envWorkerNum : 2;
|
||||
|
||||
// own modules
|
||||
const config = require('./config/config');
|
||||
|
|
Loading…
Reference in New Issue