Skip to content

Commit

Permalink
Get rid of a function off Ringpop prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Sep 29, 2015
1 parent d862bdb commit e8fd494
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
7 changes: 0 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,6 @@ RingPop.prototype.getStats = function getStats() {
return stats;
};

RingPop.prototype.handleTick = function handleTick(cb) {
var self = this;
this.pingMemberNow(function () {
cb(null, JSON.stringify({ checksum: self.membership.checksum }));
});
};

RingPop.prototype.isStatsHookRegistered = function isStatsHookRegistered(name) {
return !!this.statsHooks[name];
};
Expand Down
11 changes: 9 additions & 2 deletions server/admin/gossip.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ function createGossipStopHandler(ringpop) {

function createGossipTickHandler(ringpop) {
return function handleGossipTick(arg1, arg2, hostInfo, callback) {
ringpop.handleTick(function onTick(err, resp) {
callback(err, null, JSON.stringify(resp));
ringpop.pingMemberNow(function onPing(err) {
if (err) {
callback(err);
return;
}

callback(null, null, JSON.stringify({
checksum: ringpop.membership.checksum
}));
});
};
}
Expand Down

0 comments on commit e8fd494

Please sign in to comment.