removed cluster from app.js

v1.18.x
barisusakli 11 years ago
parent 0f46051fcf
commit 298f14ad27

@ -104,14 +104,6 @@ function loadConfig() {
function start() { function start() {
var cluster = require('cluster');
if (cluster.isMaster) {
for(var i=0; i<2; ++i) {
cluster.fork();
}
} else {
loadConfig(); loadConfig();
winston.info('Time: ' + new Date()); winston.info('Time: ' + new Date());
@ -183,8 +175,6 @@ function start() {
}); });
}); });
}); });
}
} }
function setup() { function setup() {

@ -97,7 +97,7 @@ nconf.argv();
cluster.setupMaster({ cluster.setupMaster({
exec: "app.js", exec: "app.js",
silent: true silent: false
}); });
for(var x=0;x<numCPUs;x++) { for(var x=0;x<numCPUs;x++) {

@ -40,7 +40,7 @@ if(nconf.get('ssl')) {
auth.registerApp(app); auth.registerApp(app);
emailer.registerApp(app); emailer.registerApp(app);
notifications.init(); notifications.init();
if (cluster.worker.id === 1) { if (cluster.worker.id === 1) {
user.startJobs(); user.startJobs();
} }
@ -49,7 +49,7 @@ if(nconf.get('ssl')) {
plugins.ready(function() { plugins.ready(function() {
meta.js.minify(app.enabled('minification')); meta.js.minify(app.enabled('minification'));
meta.css.minify(); meta.css.minify();
if (cluster.worker.id === 1) { if (cluster.worker.id === 1) {
meta.sounds.init(); meta.sounds.init();
} }
@ -121,11 +121,11 @@ if(nconf.get('ssl')) {
}); });
emitter.on('templates:compiled', function() { emitter.on('templates:compiled', function() {
//if (process.send) { if (process.send) {
// callback(); callback();
//} else { } else {
module.exports.listen(); module.exports.listen();
//} }
}); });
}; };

Loading…
Cancel
Save