Kouhei Sutou
null+****@clear*****
Sun Nov 24 23:31:19 JST 2013
Kouhei Sutou 2013-11-24 23:31:19 +0900 (Sun, 24 Nov 2013) New Revision: 47e9ee583fd19555986b10418891f2932e4b59d1 https://github.com/droonga/fluent-plugin-droonga/commit/47e9ee583fd19555986b10418891f2932e4b59d1 Message: Remove unsused code from handler Modified files: lib/droonga/handler.rb Modified: lib/droonga/handler.rb (+2 -18) =================================================================== --- lib/droonga/handler.rb 2013-11-24 23:24:41 +0900 (72ab283) +++ lib/droonga/handler.rb 2013-11-24 23:31:19 +0900 (1a8c4c4) @@ -79,21 +79,7 @@ module Droonga $log.trace("#{log_tag}: process: done: no plugin: <#{command}>") return end - - unless try_handle_as_internal_message(plugin, command, body, arguments) - @task = {} - @output_values = {} - $log.trace("#{log_tag}: process: plugin: process: start", - :hander => plugin.class) - plugin.process(command, body, *arguments) - $log.trace("#{log_tag}: process: plugin: process: done", - :hander => plugin.class) - unless @output_values.empty? - $log.trace("#{log_tag}: process: output: start") - post(@output_values) - $log.trace("#{log_tag}: process: output: done") - end - end + process_command(plugin, command, body, arguments) $log.trace("#{log_tag}: process: done: <#{command}>", :plugin => plugin.class) end @@ -240,8 +226,7 @@ module Droonga output[:logger] end - # TODO: move to dispatcher - def try_handle_as_internal_message(plugin, command, request, arguments) + def process_command(plugin, command, request, arguments) return false unless request.is_a? Hash @task = request["task"] @@ -263,7 +248,6 @@ module Droonga true end - # TODO: move to dispatcher def output_xxx result = @task["values"] if @component["post"] -------------- next part -------------- HTML����������������������������... 다운로드