[Groonga-commit] droonga/fluent-plugin-droonga at 951588d [master] collector: remove unused codes

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Fri Dec 20 15:32:44 JST 2013


Kouhei Sutou	2013-12-20 15:32:44 +0900 (Fri, 20 Dec 2013)

  New Revision: 951588dd4f8fc1210ab35ba7a3a425f790e3ce44
  https://github.com/droonga/fluent-plugin-droonga/commit/951588dd4f8fc1210ab35ba7a3a425f790e3ce44

  Message:
    collector: remove unused codes

  Modified files:
    lib/droonga/collector.rb

  Modified: lib/droonga/collector.rb (+7 -27)
===================================================================
--- lib/droonga/collector.rb    2013-12-20 15:26:13 +0900 (f673d86)
+++ lib/droonga/collector.rb    2013-12-20 15:32:44 +0900 (962c1c1)
@@ -40,43 +40,23 @@ module Droonga
         command = component["command"]
         n_of_expects = component["n_of_expects"]
         synchronous = nil
-        synchronous = true unless n_of_expects.zero?
         # TODO: check if asynchronous execution is available.
         message = {
           "task"=>task,
           "name"=>nil,
           "value"=>nil,
         }
-        unless synchronous
-          descendants = {}
-          component["descendants"].each do |name, indices|
-            descendants[name] = indices.collect do |index|
-              @components[index]["routes"].map do |route|
-                @dispatcher.farm_path(route)
-              end
+        descendants = {}
+        component["descendants"].each do |name, indices|
+          descendants[name] = indices.collect do |index|
+            @components[index]["routes"].map do |route|
+              @dispatcher.farm_path(route)
             end
           end
-          message["descendants"] = descendants
-          message["id"] = @id
         end
+        message["descendants"] = descendants
+        message["id"] = @id
         @dispatcher.deliver(@id, task["route"], message, command, synchronous)
-        if synchronous
-          result = task["values"]
-          post = component["post"]
-          @dispatcher.post(result, post) if post
-          component["descendants"].each do |name, indices|
-            message = {
-              "id" => @id,
-              "input" => name,
-              "value" => result[name]
-            }
-            indices.each do |index|
-              @components[index]["routes"].each do |route|
-                @dispatcher.dispatch(message, route)
-              end
-            end
-          end
-        end
         @n_dones += 1
         @dispatcher.collectors.delete(@id) if @n_dones ==****@tasks*****
       end
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る