YUKI Hiroshi
null+****@clear*****
Wed Apr 29 15:09:20 JST 2015
YUKI Hiroshi 2015-04-29 15:09:20 +0900 (Wed, 29 Apr 2015) New Revision: 8e53dae7a02d9be8f132cb73a1a8f8e0f600d898 https://github.com/droonga/express-droonga/commit/8e53dae7a02d9be8f132cb73a1a8f8e0f600d898 Message: Sort reported nodes by their host name Modified files: lib/serf/client.js Modified: lib/serf/client.js (+3 -0) =================================================================== --- lib/serf/client.js 2015-04-29 15:03:32 +0900 (7725e3b) +++ lib/serf/client.js 2015-04-29 15:09:20 +0900 (9b7348f) @@ -116,6 +116,9 @@ Client.prototype = { liveEngineNodes = liveEngineNodes.filter(function(member) { return member.Tags[Tag.clusterId] == clusterId; }); + liveEngineNodes.sort(function(a, b) { + return a.HostName < b.HostName ? -1 : 1; + }); return { clusterIds: clusterIds, liveEngineNodes: liveEngineNodes -------------- next part -------------- HTML����������������������������...Download