[Groonga-commit] groonga/fluent-plugin-groonga at 18e9e08 [master] Make client more clever

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 20 15:00:25 JST 2014


Kouhei Sutou	2014-10-20 15:00:25 +0900 (Mon, 20 Oct 2014)

  New Revision: 18e9e085bf08e93f88d7d7790dd7ede532ce1b2e
  https://github.com/groonga/fluent-plugin-groonga/commit/18e9e085bf08e93f88d7d7790dd7ede532ce1b2e

  Message:
    Make client more clever

  Modified files:
    lib/fluent/plugin/out_groonga.rb

  Modified: lib/fluent/plugin/out_groonga.rb (+4 -8)
===================================================================
--- lib/fluent/plugin/out_groonga.rb    2014-10-20 14:53:41 +0900 (48f5a32)
+++ lib/fluent/plugin/out_groonga.rb    2014-10-20 15:00:25 +0900 (90bfa60)
@@ -100,12 +100,6 @@ module Fluent
       end
 
       private
-      def send_command(name, arguments)
-        command_class = Groonga::Command.find(name)
-        command = command_class.new(name, arguments)
-        @client.send(command)
-      end
-
       def store_records(records)
         return if****@table*****?
 
@@ -113,7 +107,7 @@ module Fluent
           "table" => @table,
           "values" => Yajl::Encoder.encode(records),
         }
-        send_command("load", arguments)
+        @client.send("load", arguments)
       end
     end
 
@@ -137,7 +131,9 @@ module Fluent
         @client.close
       end
 
-      def send(command)
+      def send(name, arguments={})
+        command_class = Groonga::Command.find(name)
+        command = command_class.new(name, arguments)
         @client ||= Groonga::Client.new(:protocol => @protocol,
                                         :host     => @host,
                                         :port     => @port,
-------------- next part --------------
HTML����������������������������...
Download 



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