[Groonga-commit] droonga/droonga-engine at bed18d8 [master] Make Cluster easy to tested

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 30 14:02:35 JST 2015


YUKI Hiroshi	2015-04-30 14:02:35 +0900 (Thu, 30 Apr 2015)

  New Revision: bed18d8685a42c75514bee4fd5d131b5fafd05ea
  https://github.com/droonga/droonga-engine/commit/bed18d8685a42c75514bee4fd5d131b5fafd05ea

  Message:
    Make Cluster easy to tested

  Modified files:
    lib/droonga/cluster.rb

  Modified: lib/droonga/cluster.rb (+12 -6)
===================================================================
--- lib/droonga/cluster.rb    2015-04-30 13:25:08 +0900 (95d2af9)
+++ lib/droonga/cluster.rb    2015-04-30 14:02:35 +0900 (9b387da)
@@ -68,7 +68,10 @@ module Droonga
 
       @params = params
       @catalog = params[:catalog]
-      @state = nil
+      @state = params[:state] || {}
+
+      @engine_nodes = nil
+      @on_change = nil
 
       reload
     end
@@ -221,14 +224,17 @@ module Droonga
     def create_engine_nodes
       all_node_names.collect do |name|
         node_state = @state[name] || {}
-        EngineNode.new(:loop  => @loop,
-                       :name  => name,
-                       :state => node_state,
-                       :auto_close_timeout =>
-                         @params[:internal_connection_lifetime])
+        create_engine_node(:name  => name,
+                           :state => node_state)
       end
     end
 
+    def create_engine_node(params)
+      EngineNode.new(params.merge(:loop => @loop,
+                                  :auto_close_timeout =>
+                                    @params[:internal_connection_lifetime]))
+    end
+
     def log_tag
       "cluster_state"
     end
-------------- next part --------------
HTML����������������������������...
다운로드 



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