Comparing version 0.4.5 to 0.4.6
@@ -46,2 +46,3 @@ var _ = require('underscore'), | ||
this.emitter = emitter; | ||
emitter.on('new-component-status', function(component){ | ||
@@ -67,2 +68,3 @@ | ||
var emitter = this.emitter; | ||
emitter.emit('new-component-status', { | ||
@@ -120,3 +122,4 @@ name : name, | ||
var params = options.params || [], | ||
var emitter = this.emitter, | ||
params = options.params || [], | ||
worker = options.worker, | ||
@@ -155,3 +158,4 @@ done = options.done, | ||
var params = options.params || [], | ||
var emitter = this.emitter, | ||
params = options.params || [], | ||
worker = options.worker, | ||
@@ -256,6 +260,6 @@ done = options.done, | ||
if(!process.clusterEventHandler){ | ||
process.clusterEventHandler = function(){ | ||
_.invoke(emitter.handlers[message.type] || [], 'apply', null, arguments); | ||
} | ||
if(emitter.handlers[event].length === 1){ | ||
process.on(event, function(){ | ||
_.invoke(emitter.handlers[event] || [], 'apply', null, arguments); | ||
}); | ||
} | ||
@@ -267,2 +271,6 @@ }, | ||
emitter.handlers[event] = _.without(emitter.handlers[event] || [], handler); | ||
if(emitter.handlers[event].length === 0){ | ||
process.removeAllListeners(event); | ||
} | ||
} | ||
@@ -269,0 +277,0 @@ }; |
@@ -8,3 +8,3 @@ { | ||
"name": "cluster2", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"repository": { | ||
@@ -11,0 +11,0 @@ "type": "git", |
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
104232
1743