[Groonga-commit] droonga/fluent-plugin-droonga at 50debc9 [master] Remove unused code

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Dec 24 19:25:26 JST 2013


Kouhei Sutou	2013-12-24 19:25:26 +0900 (Tue, 24 Dec 2013)

  New Revision: 50debc98f93a18eb3172c399e658d346f0b9b3ca
  https://github.com/droonga/fluent-plugin-droonga/commit/50debc98f93a18eb3172c399e658d346f0b9b3ca

  Message:
    Remove unused code

  Modified files:
    lib/droonga/handler.rb

  Modified: lib/droonga/handler.rb (+5 -9)
===================================================================
--- lib/droonga/handler.rb    2013-12-24 19:41:43 +0900 (d5fd6cb)
+++ lib/droonga/handler.rb    2013-12-24 19:25:26 +0900 (4bfaafd)
@@ -61,22 +61,18 @@ module Droonga
 
     def process(message)
       $log.trace("#{log_tag}: process: start")
-      body, command, arguments = parse_message(message)
+      command = message["type"]
       plugin = find_plugin(command)
       if plugin.nil?
         $log.trace("#{log_tag}: process: done: no plugin: <#{command}>")
         return
       end
-      process_command(plugin, command, message, arguments)
+      process_command(plugin, command, message)
       $log.trace("#{log_tag}: process: done: <#{command}>",
                  :plugin => plugin.class)
     end
 
     private
-    def parse_message(message)
-      [message["body"], message["type"], message["arguments"]]
-    end
-
     def prepare
       if @database_name && !@database_name.empty?
         @context = Groonga::Context.new
@@ -90,12 +86,12 @@ module Droonga
       HandlerPlugin.repository.instantiate(name, self)
     end
 
-    def process_command(plugin, command, request, arguments)
-      handler_message = HandlerMessage.new(request)
+    def process_command(plugin, command, raw_message)
+      handler_message = HandlerMessage.new(raw_message)
       handler_message.validate
 
       messenger = HandlerMessenger.new(@forwarder, handler_message, @options)
-      plugin.process(command, handler_message, messenger, *arguments)
+      plugin.process(command, handler_message, messenger)
     end
 
     def log_tag
-------------- next part --------------
HTML����������������������������...
다운로드 



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