Navigation Menu

Skip to content

Commit

Permalink
Revert "Output tags to the list of live nodes"
Browse files Browse the repository at this point in the history
This reverts commit 62841ce.
  • Loading branch information
piroor committed Jun 26, 2014
1 parent 43be50e commit 069cf63
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/droonga/command/serf_event_handler.rb
Expand Up @@ -54,27 +54,15 @@ def parse_event
end
end

def parse_tags(tags)
parsed = {}
return parsed unless tags

tags.split(",").each do |tag|
key, value = tag.split("=")
parsed[key] = value
end
parsed
end

def live_nodes
nodes = {}
members = `#{@serf} members -rpc-addr #{@serf_rpc_address}`
members.each_line do |member|
name, address, status, tags, = member.strip.split(/\s+/)
name, address, status, = member.strip.split(/\s+/)
next unless status == "alive"

nodes[name] = {
"serfAddress" => address,
"tags" => parse_tags(tags),
}
end
nodes
Expand Down

0 comments on commit 069cf63

Please sign in to comment.