Navigation Menu

Skip to content

Commit

Permalink
Separate options for DumpClient#run from parameters for its constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 15, 2015
1 parent 35bddb5 commit 2902623
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/droonga/plugins/system/absorb_data.rb
Expand Up @@ -72,7 +72,7 @@ def start
logger.info("#{count} records to be absorbed")
end
logger.info("starting to absorb the source dataset")
@dumper_error_message = dumper.run do |message|
@dumper_error_message = dumper.run(dump_options) do |message|
begin
message["dataset"] = current_dataset
@messenger.forward(message,
Expand Down Expand Up @@ -135,12 +135,13 @@ def dumper_params

:receiver_host => myself.host,
:receiver_port => 0,
}
end

:client_options => {
:backend => :coolio,
:loop => @loop,
},

def dump_options
{
:backend => :coolio,
:loop => @loop,
:messages_per_second => messages_per_second,
}
end
Expand Down

0 comments on commit 2902623

Please sign in to comment.