Kouhei Sutou
null+****@clear*****
Fri Dec 20 15:26:13 JST 2013
Kouhei Sutou 2013-12-20 15:26:13 +0900 (Fri, 20 Dec 2013) New Revision: 27595481bd0e7059f7be34b98b7a8c99f8efab2b https://github.com/droonga/fluent-plugin-droonga/commit/27595481bd0e7059f7be34b98b7a8c99f8efab2b Message: Unindent Modified files: lib/droonga/collector.rb Modified: lib/droonga/collector.rb (+21 -21) =================================================================== --- lib/droonga/collector.rb 2013-12-20 15:25:53 +0900 (6af12e0) +++ lib/droonga/collector.rb 2013-12-20 15:26:13 +0900 (f673d86) @@ -95,30 +95,30 @@ module Droonga command = "collector_" + type 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"=>name, - "value"=>value - } - 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 + synchronous = true unless n_of_expects.zero? + # TODO: check if asynchronous execution is available. + message = { + "task"=>task, + "name"=>name, + "value"=>value + } + 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 end - message["descendants"] = descendants - message["id"] = @id - end - if @id == task["route"] - process(command, message) - else - @dispatcher.deliver(@id, task["route"], message, command, synchronous) end + message["descendants"] = descendants + message["id"] = @id + end + if @id == task["route"] + process(command, message) + else + @dispatcher.deliver(@id, task["route"], message, command, synchronous) + end return if task["n_of_inputs"] < n_of_expects #the task is done if synchronous -------------- next part -------------- HTML����������������������������...Download