From cbe3b5b6dc0e44ef53f80b1b64ad285b72858d5a Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 2 Sep 2014 23:35:24 -0400 Subject: [PATCH] testing --- app.js | 11 +++++++++++ src/webserver.js | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 9c836d2c44..cf0df49229 100644 --- a/app.js +++ b/app.js @@ -103,6 +103,15 @@ function loadConfig() { } function start() { + + var cluster = require('cluster'); + + if (cluster.isMaster) { + for(var i=0; i<2; ++i) { + cluster.fork(); + } + } else { + loadConfig(); winston.info('Time: ' + new Date()); @@ -174,6 +183,8 @@ function start() { }); }); }); + + } } function setup() { diff --git a/src/webserver.js b/src/webserver.js index 3278713dd1..76cba161a2 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -114,11 +114,11 @@ if(nconf.get('ssl')) { }); emitter.on('templates:compiled', function() { - if (process.send) { - callback(); - } else { + //if (process.send) { + // callback(); + //} else { module.exports.listen(); - } + //} }); };