Default to worker count = 2
parent
af2a8882af
commit
8b20eab3b5
|
@ -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');
|
||||||
|
|
Loading…
Reference in New Issue