Navigation Menu

Skip to content

Commit

Permalink
Use serf query instead of serf event
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 28, 2014
1 parent 224ac0a commit 376c835
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/droonga-engine-join
Expand Up @@ -104,7 +104,7 @@ options.port = dataset.port
options.joining_node = "#{options.joining_host}:#{options.port}/#{options.tag}"

puts "Joining new replica to the cluster..."
Droonga::Serf.send_event(options.joining_node, "join",
Droonga::Serf.send_query(options.joining_node, "join",
"source" => options.replica_source_host,
"copy" => options.copy)

Expand Down
2 changes: 1 addition & 1 deletion bin/droonga-engine-unjoin
Expand Up @@ -81,7 +81,7 @@ options.remaining_node = "#{remaining_host}:#{options.port}/#{options.tag}"

puts "Unjoining replica from the cluster..."

Droonga::Serf.send_event(options.remaining_node, "remove_replicas",
Droonga::Serf.send_query(options.remaining_node, "remove_replicas",
"dataset" => options.dataset,
"hosts" => [options.replica_remove_host]))

Expand Down
2 changes: 1 addition & 1 deletion lib/droonga/command/serf_event_handler.rb
Expand Up @@ -136,7 +136,7 @@ def join_as_replica
sleep(1) # wait for restart

source_node = "#{source}:#{port}/#{tag}"
Serf.send_event(source_node, "add_replicas",
Serf.send_query(source_node, "add_replicas",
"dataset" => dataset,
"hosts" => [host])
end
Expand Down

0 comments on commit 376c835

Please sign in to comment.