Navigation Menu

Skip to content

Commit

Permalink
Set "messages_per_second" option for Drndump::Dumper
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 10, 2015
1 parent 4b7e970 commit 5a897d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/droonga/plugins/system/absorb_data.rb
Expand Up @@ -25,6 +25,8 @@ module System
class AbsorbDataHandler < Droonga::Handler
action.synchronous = true

DEFAULT_MESSAGES_PER_SECOND = 100

class MissingHostParameter < BadRequest
def initialize
super("\"host\" must be specified.")
Expand Down Expand Up @@ -63,6 +65,8 @@ def dumper_params(message)

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

:messages_per_second => message["messagesPerSecond"] || DEFAULT_MESSAGES_PER_SECOND,
}
end

Expand Down

0 comments on commit 5a897d6

Please sign in to comment.