[Groonga-commit] droonga/droonga-engine at f2f9b33 [master] Use NodeRole module directly

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Tue Apr 21 12:09:09 JST 2015


YUKI Hiroshi	2015-04-21 12:09:09 +0900 (Tue, 21 Apr 2015)

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

  Message:
    Use NodeRole module directly

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

  Modified: lib/droonga/dispatcher.rb (+3 -2)
===================================================================
--- lib/droonga/dispatcher.rb    2015-04-21 12:07:40 +0900 (c706d96)
+++ lib/droonga/dispatcher.rb    2015-04-21 12:09:09 +0900 (2fcbafe)
@@ -23,6 +23,7 @@ require "droonga/farm"
 require "droonga/session"
 require "droonga/error_messages"
 require "droonga/distributor"
+require "droonga/node_role"
 
 module Droonga
   class Dispatcher
@@ -232,7 +233,7 @@ module Droonga
             target_nodes =****@clust*****_nodes
             if target_nodes.empty?
               logger.error("there is no node to dispath a write step!",
-                           :my_role   => @engine_state.role,
+                           :my_role   => NodeRole.my_role,
                            :all_nodes => @cluster.engine_nodes.collect(&:to_json),
                            :step      => step)
             end
@@ -240,7 +241,7 @@ module Droonga
             target_nodes =****@clust*****_nodes
             if target_nodes.empty?
               logger.error("there is no node to dispath a read step!",
-                           :my_role   => @engine_state.role,
+                           :my_role   => NodeRole.my_role,
                            :all_nodes => @cluster.engine_nodes.collect(&:to_json),
                            :step      => step)
             end

  Modified: lib/droonga/engine_state.rb (+0 -4)
===================================================================
--- lib/droonga/engine_state.rb    2015-04-21 12:07:40 +0900 (636a7df)
+++ lib/droonga/engine_state.rb    2015-04-21 12:09:09 +0900 (801bde0)
@@ -147,10 +147,6 @@ module Droonga
       not****@sessi*****?
     end
 
-    def role
-      NodeRole.my_role
-    end
-
     private
     def log_tag
       "engine_state"
-------------- next part --------------
HTML����������������������������...
ダウンロード 



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