Skip to content
Snippets Groups Projects
Commit 7e9f1e8f authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Fix number of worker in development

parent 74dd047d
No related branches found
No related tags found
1 merge request!116Release v1.0.0
...@@ -14,7 +14,7 @@ if (!compatVersion()) { ...@@ -14,7 +14,7 @@ if (!compatVersion()) {
if(cluster.isMaster) { if(cluster.isMaster) {
log.info(`Master ${process.pid} is running`); log.info(`Master ${process.pid} is running`);
const numCPUs = require('os').cpus().length; const numCPUs = (process.env.NODE_ENV != 'development') ? require('os').cpus().length : 1;
log.info(`Master will create ${numCPUs} workers`); log.info(`Master will create ${numCPUs} workers`);
for(let i=0; i < numCPUs; ++i) { for(let i=0; i < numCPUs; ++i) {
cluster.fork(); cluster.fork();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment