[Groonga-commit] droonga/fluent-plugin-droonga at 0ff8a79 [master] Remove unused code

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 20 17:06:18 JST 2013


Kouhei Sutou	2013-12-20 17:06:18 +0900 (Fri, 20 Dec 2013)

  New Revision: 0ff8a79fcf75dbf82cc99ea094d4f7da4ed236f0
  https://github.com/droonga/fluent-plugin-droonga/commit/0ff8a79fcf75dbf82cc99ea094d4f7da4ed236f0

  Message:
    Remove unused code

  Modified files:
    lib/droonga/collector_plugin.rb
    lib/droonga/plugin/collector/basic.rb

  Modified: lib/droonga/collector_plugin.rb (+1 -32)
===================================================================
--- lib/droonga/collector_plugin.rb    2013-12-20 16:59:29 +0900 (6558241)
+++ lib/droonga/collector_plugin.rb    2013-12-20 17:06:18 +0900 (41a381b)
@@ -39,44 +39,13 @@ module Droonga
       @id = message["id"]
       @value = message["value"]
       @input_name = message["name"]
-      @descendants = message["descendants"]
       super(command, @value)
-      output if @descendants
       true
     end
 
     # TODO: consider better name
-    def emit(value, name=nil)
-      unless name
-        if @output_names
-          name = @output_names.first
-        else
-          @output_values = @task["values"] = value
-          return
-        end
-      end
+    def emit(name, value)
       @output_values[name] = value
     end
-
-    def post(message, destination=nil)
-      @dispatcher.post(message, destination)
-    end
-
-    def output
-      result = @task["values"]
-      post(result, @component["post"]) if @component["post"]
-      @descendants.each do |name, dests|
-        message = {
-          "id" => @id,
-          "input" => name,
-          "value" => result[name]
-        }
-        dests.each do |routes|
-          routes.each do |route|
-            post(message, "to"=>route, "type"=>"dispatcher")
-          end
-        end
-      end
-    end
   end
 end

  Modified: lib/droonga/plugin/collector/basic.rb (+2 -2)
===================================================================
--- lib/droonga/plugin/collector/basic.rb    2013-12-20 16:59:29 +0900 (5a52160)
+++ lib/droonga/plugin/collector/basic.rb    2013-12-20 17:06:18 +0900 (9909413)
@@ -60,7 +60,7 @@ module Droonga
         end
         output = output["output"]
       end
-      emit(result, output)
+      emit(output, result)
     end
 
     def apply_output_range(items, output)
@@ -106,7 +106,7 @@ module Droonga
         value = request
         old_value = output_values[output]
         value = reduce(elements, old_value, request) if old_value
-        emit(value, output)
+        emit(output, value)
       end
     end
 
-------------- next part --------------
HTML����������������������������...
다운로드 



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