|
|
@ -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() {
|
|
|
|
Loader.init = function() {
|
|
|
|
cluster.setupMaster({
|
|
|
|
cluster.setupMaster({
|
|
|
|
exec: "app.js",
|
|
|
|
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 (nconf.get('daemon') !== false) {
|
|
|
|
if (fs.existsSync(pidFilePath)) {
|
|
|
|
if (fs.existsSync(pidFilePath)) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|