Kouhei Sutou
null+****@clear*****
Fri May 27 16:57:02 JST 2016
Kouhei Sutou 2016-05-27 16:57:02 +0900 (Fri, 27 May 2016) New Revision: 38a5fcc7e1d88a87a4bcb0eb4f3a8da155f4f173 https://github.com/groonga/fluent-plugin-groonga/commit/38a5fcc7e1d88a87a4bcb0eb4f3a8da155f4f173 Message: Use router#emit GitHub: fix #6 Reported by okkez. Thanks!!! Modified files: lib/fluent/plugin/in_groonga.rb Modified: lib/fluent/plugin/in_groonga.rb (+9 -3) =================================================================== --- lib/fluent/plugin/in_groonga.rb 2016-03-28 18:22:54 +0900 (82450db) +++ lib/fluent/plugin/in_groonga.rb 2016-05-27 16:57:02 +0900 (e8dd723) @@ -47,9 +47,9 @@ module Fluent super case @protocol when :http - @input = HTTPInput.new + @input = HTTPInput.new(self) when :gqtp - @input = GQTPInput.new + @input = GQTPInput.new(self) end @input.configure(conf) end @@ -109,6 +109,10 @@ module Fluent end end + def initialize(input_plugin) + @input_plugin = input_plugin + end + def configure(conf) super @@ -149,7 +153,9 @@ module Fluent def emit(command, params) return unless emit_command?(command) - Engine.emit("groonga.command.#{command}", Engine.now, params) + @input_plugin.router.emit("groonga.command.#{command}", + Engine.now, + params) end private -------------- next part -------------- HTML����������������������������...Download