Comparing version 0.3.0 to 0.3.1
var os = require('os'), | ||
cluster = require('cluster'), | ||
extend = require('extend'), | ||
ClusterProcess = require('./cluster_process'), | ||
@@ -38,2 +39,9 @@ WorkerWrapper = require('./worker_wrapper'), | ||
/** | ||
* Configuration object to pass to cluster.setupMaster() | ||
* @type {Object} | ||
* @private | ||
*/ | ||
this._masterOpts = {}; | ||
this.on('worker ready', this._onWorkerReady.bind(this)); | ||
@@ -49,2 +57,9 @@ this.on('worker state', this._cleanupUnixSockets.bind(this)); | ||
/** | ||
* @param {Object} opts | ||
*/ | ||
Master.prototype.setup = function(opts) { | ||
extend(this._masterOpts, opts); | ||
}; | ||
/** | ||
* SIGINT and SIGQUIT handler | ||
@@ -213,3 +228,3 @@ * @private | ||
// remove `--debug` option from passed to master | ||
cluster.setupMaster({ | ||
this.setup({ | ||
execArgv : process.execArgv.filter(function(s) { | ||
@@ -297,2 +312,4 @@ return ! /^\-\-debug/.test(s); | ||
Master.prototype.run = Master.whenInitialized(function() { | ||
cluster.setupMaster(this._masterOpts); | ||
this.waitForWorkers( | ||
@@ -299,0 +316,0 @@ this.getWorkersArray().map(function(worker) { |
{ | ||
"name" : "luster", | ||
"version" : "0.3.0", | ||
"version" : "0.3.1", | ||
"description" : "Node.js cluster wrapper", | ||
@@ -5,0 +5,0 @@ "main" : "./lib/luster.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1865
98441