[Groonga-commit] droonga/droonga-engine at 9eb1c5a [master] Output stable results for status of nodes

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Apr 8 21:12:33 JST 2015


YUKI Hiroshi	2015-04-08 21:12:33 +0900 (Wed, 08 Apr 2015)

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

  Message:
    Output stable results for status of nodes

  Modified files:
    lib/droonga/cluster.rb
    lib/droonga/serf.rb

  Modified: lib/droonga/cluster.rb (+5 -1)
===================================================================
--- lib/droonga/cluster.rb    2015-04-08 20:24:42 +0900 (6875faf)
+++ lib/droonga/cluster.rb    2015-04-08 21:12:33 +0900 (0360e7b)
@@ -134,7 +134,11 @@ module Droonga
           "status" => node.status,
         }
       end
-      nodes_status
+      sorted_nodes_status = {}
+      nodes_status.keys.sort.each do |key|
+        sorted_nodes_status[key] = nodes_status[key]
+      end
+      sorted_nodes_status
     end
 
     def forward(message, destination)

  Modified: lib/droonga/serf.rb (+5 -1)
===================================================================
--- lib/droonga/serf.rb    2015-04-08 20:24:42 +0900 (94ac920)
+++ lib/droonga/serf.rb    2015-04-08 21:12:33 +0900 (b183b9b)
@@ -150,7 +150,11 @@ module Droonga
       unprocessed_messages_existence.each do |node_name, have_messages|
         nodes[node_name]["have_unprocessed_messages"] = have_messages
       end
-      nodes
+      sorted_nodes = {}
+      nodes.keys.sort.each do |key|
+        sorted_nodes[key] = nodes[key]
+      end
+      sorted_nodes
     end
 
     def set_tag(name, value)
-------------- next part --------------
HTML����������������������������...
Download 



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