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

clusterhub

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clusterhub - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

21

lib/fork.js

@@ -175,19 +175,10 @@ var cluster = require('cluster')

worker.on('message', onmessage);
worker.once('exit', function onexit() {
workers.splice(workers.indexOf(obj), 1);
worker.removeListener('online', obj.ononline);
worker.removeListener('message', obj.onmessage);
return false;
});
return worker;
};
/**
* Remove workers on death
*/
cluster.on('exit', function(worker) {
workers.forEach(function(obj, i) {
if (obj.worker === worker) {
workers.splice(i, 1);
worker.removeListener('online', obj.ononline);
worker.removeListener('message', obj.onmessage);
return false;
}
});
});

@@ -5,3 +5,3 @@ {

"keywords": ["cluster", "load balance", "database", "multi process", "sync"],
"version": "0.2.2",
"version": "0.2.3",
"repository": {

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

@@ -1,5 +0,4 @@

var hub = require('..')
, cluster = require('cluster')
, assert = require('assert')
, WORKERS = 2
var hub = require('..');
var cluster = require('cluster');
var WORKERS = 2;

@@ -28,3 +27,3 @@

cluster.on('exit', function(worker) {
cluster.on('exit', function() {
cluster.fork();

@@ -31,0 +30,0 @@ });

@@ -1,3 +0,3 @@

var hub = require('..')
, assert = require('assert')
var hub = require('..');
var assert = require('assert');

@@ -4,0 +4,0 @@

@@ -1,5 +0,5 @@

var hub = require('..')
, cluster = require('cluster')
, assert = require('assert')
, WORKERS = 1
var hub = require('..');
var cluster = require('cluster');
var assert = require('assert');
var WORKERS = 1;

@@ -117,4 +117,4 @@

it('Does not fire any event', function(done) {
var a = true
, b = true
var a = true;
var b = true;

@@ -147,3 +147,3 @@ hub.on('a', function() {

hub.removeAllListeners('a')
hub.removeAllListeners('a');
hub.once('remove', function() {

@@ -156,3 +156,3 @@ assert(a);

});
})
});

@@ -159,0 +159,0 @@ });

@@ -1,5 +0,4 @@

var hub = require('..')
, cluster = require('cluster')
, assert = require('assert')
, WORKERS = 2
var hub = require('..');
var cluster = require('cluster');
var WORKERS = 2;

@@ -6,0 +5,0 @@

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