Commit e8306a3123ec03616c9a5523a32f8b3d8423b309

Authored by Adhidarma Hadiwinoto
1 parent 6398fc28d2
Exists in master

Disable cluster mode

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

lib/webservice/index.js
  1 +const CLUSTER_MODE = false;
1 2 const cluster = require('cluster');
2 3 const numCPUs = require('os').cpus().length;
3 4 const express = require('express');
... ... @@ -12,7 +13,7 @@ const routerPriceplan = require('./router/priceplan');
12 13  
13 14 app.use('/apikey/:apikey/priceplan', routerPriceplan);
14 15  
15   -if (cluster.isMaster) {
  16 +if (CLUSTER_MODE && cluster.isMaster) {
16 17 logger.info(`Master ${process.pid} is running`);
17 18  
18 19 // Fork workers.