[Groonga-commit] ranguba/groonga-client-cli at 98c50cc [master] Add --chunk option

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Aug 19 16:22:48 JST 2016


Kouhei Sutou	2016-08-19 16:22:48 +0900 (Fri, 19 Aug 2016)

  New Revision: 98c50ccb62d82c54eadad991d13a9fe6e881062b
  https://github.com/ranguba/groonga-client-cli/commit/98c50ccb62d82c54eadad991d13a9fe6e881062b

  Message:
    Add --chunk option

  Modified files:
    lib/groonga-client-cli/groonga-client.rb

  Modified: lib/groonga-client-cli/groonga-client.rb (+10 -0)
===================================================================
--- lib/groonga-client-cli/groonga-client.rb    2016-08-19 15:09:03 +0900 (cf547f6)
+++ lib/groonga-client-cli/groonga-client.rb    2016-08-19 16:22:48 +0900 (81bc0f3)
@@ -34,6 +34,8 @@ module GroongaClientCLI
 
       @read_timeout = Groonga::Client::Default::READ_TIMEOUT
 
+      @chunk = false
+
       @runner_options = {
         :split_load_chunk_size => 10000,
         :generate_request_id   => false,
@@ -47,6 +49,7 @@ module GroongaClientCLI
                                     :host     => @host,
                                     :port     => @port,
                                     :read_timeout => @read_timeout,
+                                    :chunk    => @chunk,
                                     :backend  => :synchronous)
       runner = Runner.new(@client, @runner_options)
 
@@ -124,6 +127,13 @@ module GroongaClientCLI
         @runner_options[:generate_request_id] = boolean
       end
 
+      parser.on("--[no-]chunk",
+                "Use \"Transfer-Encoding: chunked\" for load command.",
+                "HTTP only.",
+                "(#{@chunk})") do |boolean|
+        @chunk = boolean
+      end
+
       command_file_paths = parser.parse(argv)
 
       @port ||= default_port(@protocol)
-------------- next part --------------
HTML����������������������������...
다운로드 



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