YUKI Hiroshi
null+****@clear*****
Tue Jan 6 19:49:39 JST 2015
YUKI Hiroshi 2015-01-06 19:49:39 +0900 (Tue, 06 Jan 2015) New Revision: 1fd676ca4960de73c293272ace1a466f0dfe4e87 https://github.com/droonga/droonga-engine/commit/1fd676ca4960de73c293272ace1a466f0dfe4e87 Message: Make detailed method private Modified files: lib/droonga/engine_node.rb Modified: lib/droonga/engine_node.rb (+18 -18) =================================================================== --- lib/droonga/engine_node.rb 2015-01-06 19:45:53 +0900 (d97df2c) +++ lib/droonga/engine_node.rb 2015-01-06 19:49:39 +0900 (7b1cfaa) @@ -62,30 +62,13 @@ module Droonga if not really_writable? @buffer.add(message, destination) elsif****@buffe*****? - @output(message, destination) + output(message, destination) else @buffer.add(message, destination) @buffer.start_forward end end - def output(message, destination) - command = destination["type"] - receiver = destination["to"] - arguments = destination["arguments"] - - override_message = { - "type" => command, - } - override_message["arguments"] = arguments if arguments - message = message.merge(override_message) - output_tag = "#{tag}.message" - log_info = "<#{receiver}>:<#{output_tag}>" - logger.trace("forward: start: #{log_info}") - @sender.send(output_tag, message) - logger.trace("forward: end") - end - def live? @state.nil? or @state["live"] end @@ -159,6 +142,23 @@ module Droonga end private + def output(message, destination) + command = destination["type"] + receiver = destination["to"] + arguments = destination["arguments"] + + override_message = { + "type" => command, + } + override_message["arguments"] = arguments if arguments + message = message.merge(override_message) + output_tag = "#{tag}.message" + log_info = "<#{receiver}>:<#{output_tag}>" + logger.trace("forward: start: #{log_info}") + @sender.send(output_tag, message) + logger.trace("forward: end") + end + def log_tag "[#{Process.ppid}] engine-node" end -------------- next part -------------- HTML����������������������������...Download