Daijiro MORI
null+****@clear*****
Wed Apr 24 12:08:40 JST 2013
Daijiro MORI 2013-04-24 12:08:40 +0900 (Wed, 24 Apr 2013) New Revision: 3680d84d71b1faf8f05722dcedaa6fbb9b16fbd3 https://github.com/groonga/fluent-plugin-droonga/commit/3680d84d71b1faf8f05722dcedaa6fbb9b16fbd3 Message: Pass the "arguments" property of the envelope to the handler. Modified files: lib/droonga/handler.rb lib/droonga/worker.rb Modified: lib/droonga/handler.rb (+2 -2) =================================================================== --- lib/droonga/handler.rb 2013-04-23 13:08:15 +0900 (397e0ce) +++ lib/droonga/handler.rb 2013-04-24 12:08:40 +0900 (3c77be6) @@ -67,8 +67,8 @@ module Droonga self.class.handlable?(command) end - def handle(command, request) - __send__(self.class.method_name(command), request) + def handle(command, request, *arguments) + __send__(self.class.method_name(command), request, *arguments) end end end Modified: lib/droonga/worker.rb (+3 -3) =================================================================== --- lib/droonga/worker.rb 2013-04-23 13:08:15 +0900 (7371387) +++ lib/droonga/worker.rb 2013-04-24 12:08:40 +0900 (380f737) @@ -59,7 +59,7 @@ module Droonga def dispatch(*message) parse_message(message) - post(envelope["body"], envelope["type"]) + post(envelope["body"], envelope["type"], *envelope["arguments"]) end def add_handler(name) @@ -71,7 +71,7 @@ module Droonga envelope["via"].push(route) end - def post(body, destination=nil) + def post(body, destination=nil, *arguments) route = nil unless destination route = envelope["via"].pop @@ -99,7 +99,7 @@ module Droonga if handler # synchronous = handler.prefer_synchronous? if synchronous.nil? if route || @pool.empty? || synchronous - handler.handle(command, body) + handler.handle(command, body, *arguments) else push_message end -------------- next part -------------- HTML����������������������������...Download