[Groonga-commit] droonga/droonga-client-ruby at acdb0e6 [master] Add --timeout

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jan 27 18:16:51 JST 2014


Kouhei Sutou	2014-01-27 18:16:51 +0900 (Mon, 27 Jan 2014)

  New Revision: acdb0e65fa71669d84f32d2abc0a521691dfc5b2
  https://github.com/droonga/droonga-client-ruby/commit/acdb0e65fa71669d84f32d2abc0a521691dfc5b2

  Message:
    Add --timeout

  Modified files:
    sample/droonga-request.rb

  Modified: sample/droonga-request.rb (+8 -0)
===================================================================
--- sample/droonga-request.rb    2014-01-27 18:14:54 +0900 (162bbbe)
+++ sample/droonga-request.rb    2014-01-27 18:16:51 +0900 (ce9ec81)
@@ -23,6 +23,7 @@ options = {
   :port          => 24224,
   :tag           => "droonga",
   :protocol      => :droonga,
+  :timeout       => 10,
   :receiver_host => "localhost",
   :receiver_port => 0,
 }
@@ -54,6 +55,13 @@ parser.on("--protocol=PROTOCOL", available_protocols,
   options[:protocol] = protocol
 end
 parser.separator("")
+parser.separator("Timeout:")
+parser.on("--timeout=TIMEOUT", Integer,
+          "Timeout for operations.",
+          "(#{options[:timeout]})") do |timeout|
+  options[:timeout] = timeout
+end
+parser.separator("")
 parser.separator("Droonga protocol:")
 parser.on("--receiver-host=HOST",
           "Host name to be received a response from Droonga engine.",
-------------- next part --------------
HTML����������������������������...
下載 



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