mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-03 14:20:33 +01:00
cluster by default is now opt-in
This commit is contained in:
16
loader.js
16
loader.js
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user