[Groonga-commit] droonga/fluent-plugin-droonga at da1a298 [master] Hide collectors

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Fri Dec 20 16:03:47 JST 2013


Kouhei Sutou	2013-12-20 16:03:47 +0900 (Fri, 20 Dec 2013)

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

  Message:
    Hide collectors

  Modified files:
    lib/droonga/collector.rb
    lib/droonga/dispatcher.rb

  Modified: lib/droonga/collector.rb (+4 -2)
===================================================================
--- lib/droonga/collector.rb    2013-12-20 15:58:48 +0900 (0cd7fa5)
+++ lib/droonga/collector.rb    2013-12-20 16:03:47 +0900 (0ecfef7)
@@ -32,6 +32,10 @@ module Droonga
       load_plugins(["basic"]) # TODO: make customizable
     end
 
+    def done?
+      @n_dones ==****@tasks*****
+    end
+
     def start
       tasks = @inputs[nil]
       tasks.each do |task|
@@ -55,7 +59,6 @@ module Droonga
         }
         @dispatcher.process_in_farm(task["route"], message, command, synchronous)
         @n_dones += 1
-        @dispatcher.collectors.delete(@id) if @n_dones ==****@tasks*****
       end
     end
 
@@ -95,7 +98,6 @@ module Droonga
           end
         end
         @n_dones += 1
-        @dispatcher.collectors.delete(@id) if @n_dones ==****@tasks*****
       end
     end
 

  Modified: lib/droonga/dispatcher.rb (+2 -1)
===================================================================
--- lib/droonga/dispatcher.rb    2013-12-20 15:58:48 +0900 (dcdfce2)
+++ lib/droonga/dispatcher.rb    2013-12-20 16:03:47 +0900 (af80624)
@@ -26,7 +26,7 @@ require "droonga/input_message"
 
 module Droonga
   class Dispatcher
-    attr_reader :name, :envelope, :collectors
+    attr_reader :name, :envelope
 
     def initialize(options)
       @options = options
@@ -137,6 +137,7 @@ module Droonga
         end
         collector.start
       end
+      @collectors.delete(id) if collector.done?
     end
 
     def dispatch(message, destination)
-------------- next part --------------
HTML����������������������������...
ダウンロード 



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