Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

the 'enabled' flag on server.cluster config is now recognized

  • Loading branch information...
commit a40321821653fbb3e60e64b842e62508c5268e3a 1 parent 6ebd77e
@mikefrey mikefrey authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 master.js
View
5 master.js
@@ -9,16 +9,17 @@ module.exports.start = function(config) {
console.error = logger.info.bind(logger)
console.log = logger.info.bind(logger)
+ var clusterConfig = config.server.cluster || { size:1 }
+
// debug mode, don't run the cluster, just execute the worker
var argv = process.argv.concat(process.execArgv || [])
- if (~argv.indexOf('--debug') || ~argv.indexOf('--debug-brk')) {
+ if (clusterConfig.enabled === false || ~argv.indexOf('--debug') || ~argv.indexOf('--debug-brk')) {
process.argv.push('--worker=' + config.worker, '--config=' + config.config)
return require(workerScript)
}
// configure the cluster
var clusterMaster = require("cluster-master")
- var clusterConfig = config.server.cluster || { size:1 }
clusterConfig.exec = path.resolve(__dirname, './worker.js')
clusterConfig.args = [
'--worker=' + config.worker,
Please sign in to comment.
Something went wrong with that request. Please try again.