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

cluster-status

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cluster-status - npm Package Compare versions

Comparing version 0.5.0-SNAPSHOT.1387314512824 to 0.5.0-SNAPSHOT.1387826685226

29

index.js

@@ -53,2 +53,4 @@ 'use strict';

}
emitter.to([pid]).emit('status-registered', name);
});

@@ -67,2 +69,4 @@

logger().info('[status] unregister status: %s in process: %d', name, pid);
emitter.to([pid]).emit('status-unregistered', name);
});

@@ -92,2 +96,12 @@

var tillRegistered = when.defer();
emitter.on('status-registered', function onRegistered(registered){
if(name === registered){
tillRegistered.resolve(registered);
emitter.removeListener('status-registered', onRegistered);
}
});
emitter.to(['master', 'self']).emit('new-status', name, process.pid, view, update);

@@ -106,2 +120,4 @@

});
return tillRegistered.promise;
},

@@ -111,2 +127,13 @@

var tillUnregistered = when.defer();
emitter.on('status-unregistered', function onUnregistered(unregistered){
if(name === unregistered){
tillUnregistered.resolve(unregistered);
emitter.removeListener('status-unregistered', onUnregistered);
}
});
emitter.to(['master', 'self']).emit('del-status', name, process.pid);

@@ -117,2 +144,4 @@

emitter.removeAllListeners(util.format('set-status-%s', name));
return tillUnregistered.promise;
},

@@ -119,0 +148,0 @@

2

package.json
{
"name": "cluster-status",
"version": "0.5.0-SNAPSHOT.1387314512824",
"version": "0.5.0-SNAPSHOT.1387826685226",
"description": "cluster-status ===============",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,35 +35,38 @@ 'use strict';

return view;
});
})
.then(function(registered){
status.getStatus(name).then(function(result){
name.should.equal(registered);
status.getStatus(name).then(function(result){
result.should.be.ok;
result.length.should.equal(1);
result.should.be.ok;
result.length.should.equal(1);
var stat = result.shift();
stat.should.be.ok;
stat.pid.should.equal(process.pid);
stat.name.should.equal(name);
stat.status.should.equal(view);
var stat = result.shift();
stat.should.be.ok;
stat.pid.should.equal(process.pid);
stat.name.should.equal(name);
stat.status.should.equal(view);
status.setStatus(name, 'noop').then(function(){ //as we didn't register update, setStatus should have no effect at all.
status.setStatus(name, 'noop').then(function(){ //as we didn't register update, setStatus should have no effect at all.
status.getStatus(name).then(function(result){
status.getStatus(name).then(function(result){
result.should.be.ok;
result.length.should.equal(1);
result.should.be.ok;
result.length.should.equal(1);
var stat = result.shift();
stat.should.be.ok;
stat.pid.should.equal(process.pid);
stat.name.should.equal(name);
stat.status.should.equal(view);
var stat = result.shift();
stat.should.be.ok;
stat.pid.should.equal(process.pid);
stat.name.should.equal(name);
stat.status.should.equal(view);
done();
done();
});
});
}, done);
}, done);
}, done);
});
});

@@ -70,0 +73,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