Navigation Menu

Skip to content

Commit

Permalink
Set "absorbing" tag for self
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 10, 2015
1 parent 5a897d6 commit f6149ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/droonga/plugins/system/absorb_data.rb
Expand Up @@ -44,12 +44,18 @@ def handle(message)
raise MissingHostParameter.new unless message.include?("host")

dumper = Drndump::Dumper.new(dumper_params(message))

serf = Serf.new(my_node_name)
serf.set_tag("absorbing", true)

error_message = dumper.run do |message|
@messenger.forward(message,
"to" => my_node_name,
"type" => message["type"])
end

serf.set_tag("absorbing", true)

raise DumpFailed.new(error_message) if error_message

true
Expand Down

0 comments on commit f6149ca

Please sign in to comment.