cluster by default is now opt-in

This commit is contained in:
psychobunny
2014-09-16 11:17:57 -04:00
parent 101ac701ef
commit e60d88afa6

View File

@@ -17,12 +17,6 @@ var nconf = require('nconf'),
}
};
nconf.argv().file({
file: path.join(__dirname, '/config.json')
});
numCPUs = nconf.get('cluster') || require('os').cpus().length;
Loader.init = function() {
cluster.setupMaster({
exec: "app.js",
@@ -157,6 +151,16 @@ Loader.reload = function() {
});
};
nconf.argv().file({
file: path.join(__dirname, '/config.json')
});
numCPUs = nconf.get('cluster') || 1;
numCPUs = (numCPUs === true) ? require('os').cpus().length : numCPUs;
if (nconf.get('daemon') !== false) {
if (fs.existsSync(pidFilePath)) {
try {