YUKI Hiroshi
null+****@clear*****
Sun Nov 30 00:44:01 JST 2014
YUKI Hiroshi 2014-11-30 00:44:01 +0900 (Sun, 30 Nov 2014) New Revision: 369ecf9264a3519d9a7abf000315189587cea9ae https://github.com/droonga/droonga-engine/commit/369ecf9264a3519d9a7abf000315189587cea9ae Message: Add new remote command to restart Serf agent Modified files: lib/droonga/command/remote.rb lib/droonga/command/serf_event_handler.rb Modified: lib/droonga/command/remote.rb (+8 -0) =================================================================== --- lib/droonga/command/remote.rb 2014-11-30 00:43:09 +0900 (e4bf1fb) +++ lib/droonga/command/remote.rb 2014-11-30 00:44:01 +0900 (a67612e) @@ -14,6 +14,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA require "json" +require "fileutils" require "droonga/path" require "droonga/serf" @@ -380,6 +381,13 @@ module Droonga @serf.live_nodes end end + + class RestartSerfAgent < Base + def process + FileUtils.mkdir_p(Serf.restart_file.parent) + FileUtils.touch(Serf.restart_file) + end + end end end end Modified: lib/droonga/command/serf_event_handler.rb (+2 -0) =================================================================== --- lib/droonga/command/serf_event_handler.rb 2014-11-30 00:43:09 +0900 (d13a997) +++ lib/droonga/command/serf_event_handler.rb 2014-11-30 00:44:01 +0900 (281ec69) @@ -85,6 +85,8 @@ module Droonga Remote::RemoveReplicas when "absorb_data" Remote::AbsorbData + when "restart_serf_agent" + Remote::RestartSerfAgent else nil end -------------- next part -------------- HTML����������������������������...Download