Skip to content

Node.js based forum software built for the modern web

removed cluster from app.js

barisusakli298f14ad2779
diff --git a/app.js b/app.js
index cf0df49229..bf137a3ec0 100644
--- a/app.js
+++ b/app.js
@@ -104,14 +104,6 @@ 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());
@@ -183,8 +175,6 @@ function start() {
});
});
});
-
- }
}
function setup() {
diff --git a/loader.js b/loader.js
index 6d65b203b5..304ef1b4b6 100644
--- a/loader.js
+++ b/loader.js
@@ -97,7 +97,7 @@ nconf.argv();
cluster.setupMaster({
exec: "app.js",
- silent: true
+ silent: false
});
for(var x=0;x<numCPUs;x++) {
diff --git a/src/webserver.js b/src/webserver.js
index b051e37b23..a45b7003b2 100644
--- a/src/webserver.js
+++ b/src/webserver.js
@@ -40,7 +40,7 @@ if(nconf.get('ssl')) {
auth.registerApp(app);
emailer.registerApp(app);
notifications.init();
-
+
if (cluster.worker.id === 1) {
user.startJobs();
}
@@ -49,7 +49,7 @@ if(nconf.get('ssl')) {
plugins.ready(function() {
meta.js.minify(app.enabled('minification'));
meta.css.minify();
-
+
if (cluster.worker.id === 1) {
meta.sounds.init();
}
@@ -121,11 +121,11 @@ if(nconf.get('ssl')) {
});
emitter.on('templates:compiled', function() {
- //if (process.send) {
- // callback();
- //} else {
+ if (process.send) {
+ callback();
+ } else {
module.exports.listen();
- //}
+ }
});
};