Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cluster2

Package Overview
Dependencies
Maintainers
6
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cluster2 - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

25

lib/component-status.js

@@ -44,2 +44,3 @@ var _ = require('underscore'),

var components = this.components = {},
workers = this.workers = {},
reducers = this.reducers = {};

@@ -52,7 +53,17 @@

components[component.name] = {
reducer: component.reducer,
count: components[component.name] ? components[component.name].count + 1 : 1
'reducer': component.reducer,
'count': components[component.name] ? components[component.name].count + 1 : 1
};
workers[component.worker] = workers[component.worker] || [];
workers[component.worker].push(component.name);
});
emitter.on('worker-died', function(worker){
_.each(workers[worker] || [], function(component){
components[component].count = components[component].count - 1;
});
});
this.reducer('default', DEFAULT_REDUCER)

@@ -71,4 +82,5 @@ .reducer('sum', DEFAULT_REDUCER)

emitter.emit('new-component-status', {
name : name,
reducer: reducer
'name' : name,
'reducer': reducer,
'worker': process.pid
});

@@ -287,2 +299,7 @@

});
process.cluster.emitter.on('died', function(pid){
//bugfix of slow vi, as some worker died, and we didn't reduce the expectations.
process.emit.apply(process, ['worker-died', pid]);
});
}

@@ -289,0 +306,0 @@

2

package.json

@@ -8,3 +8,3 @@ {

"name": "cluster2",
"version": "0.4.6",
"version": "0.4.7",
"repository": {

@@ -11,0 +11,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc