Skip to content
Snippets Groups Projects
Commit 17a6ad77 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Limit the number of workers to 8

parent 05e89d84
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ function PowEngine(conf, logger) {
process.execArgv = [];
}
const nbWorkers = require('os').cpus().slice(0, conf && conf.nbCores || constants.CORES_MAXIMUM_USE_IN_PARALLEL).length
const nbWorkers = Math.min(constants.CORES_MAXIMUM_USE_IN_PARALLEL, require('os').cpus().slice(0, conf && conf.nbCores || 1).length)
const cluster = powCluster(nbWorkers, logger)
this.forceInit = () => cluster.initCluster()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment