[Groonga-commit] droonga/droonga-engine at 2184e0c [master] Define default messages per second as a constant

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Apr 10 17:04:01 JST 2015


YUKI Hiroshi	2015-04-10 17:04:01 +0900 (Fri, 10 Apr 2015)

  New Revision: 2184e0c2f65994cbf6465ccd6027d98415804f79
  https://github.com/droonga/droonga-engine/commit/2184e0c2f65994cbf6465ccd6027d98415804f79

  Message:
    Define default messages per second as a constant

  Modified files:
    lib/droonga/plugin/async_command.rb

  Modified: lib/droonga/plugin/async_command.rb (+3 -1)
===================================================================
--- lib/droonga/plugin/async_command.rb    2015-04-10 17:03:33 +0900 (4dc6dd1)
+++ lib/droonga/plugin/async_command.rb    2015-04-10 17:04:01 +0900 (5109806)
@@ -47,12 +47,14 @@ module Droonga
           @message.request
         end
 
+        DEFAULT_MESSAGES_PER_SECOND = 10000
+
         def messages_per_seconds
           request = (@message.request || {})
           minimum_messages_per_seconds = 10
           [
             minimum_messages_per_seconds,
-            (request["messagesPerSecond"] || 10000).to_i,
+            (request["messagesPerSecond"] || DEFAULT_MESSAGES_PER_SECOND).to_i,
           ].max
         end
       end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index