Navigation Menu

Skip to content

Commit

Permalink
Ignore engine nodes which have unprocessed write messages
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 1, 2015
1 parent 1da94f0 commit 37cf58f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/serf/client.js
Expand Up @@ -82,6 +82,12 @@ Client.prototype = {
member.Tags.role != 'service-provider')
return false;

var name = member.Name;
if (members.some(function(member) {
return member.Tags["have-unprocessed-messages-for-" + name] == "true";
}))
return false;

var matched = String(member.Name).match(ENGINE_NODE_NAME_PATTERN);
if (matched)
member.HostName = matched[1];
Expand Down

0 comments on commit 37cf58f

Please sign in to comment.