YUKI Hiroshi
null+****@clear*****
Wed Aug 27 18:23:34 JST 2014
YUKI Hiroshi 2014-08-27 18:23:34 +0900 (Wed, 27 Aug 2014) New Revision: 17ed401e97164c1198766c6d21b1a3aec58fe640 https://github.com/long-long-float/droonga-engine/commit/17ed401e97164c1198766c6d21b1a3aec58fe640 Message: Remove needless handlers for obsolete features Modified files: lib/droonga/command/serf_event_handler.rb Modified: lib/droonga/command/serf_event_handler.rb (+0 -38) =================================================================== --- lib/droonga/command/serf_event_handler.rb 2014-08-27 17:46:10 +0900 (ad658ef) +++ lib/droonga/command/serf_event_handler.rb 2014-08-27 18:23:34 +0900 (20df33b) @@ -95,10 +95,6 @@ module Droonga remove_replicas when "absorb_data" absorb_data - when "publish_catalog" - publish_catalog - when "unpublish_catalog" - unpublish_catalog end end @@ -224,40 +220,6 @@ module Droonga JSON.parse(catalog) end - def publish_catalog - port = @payload["port"] - return unless port - - env = {} - publisher_command_line = [ - "droonga-engine-data-publisher", - "--base-dir", Path.base.to_s, - "--port", port.to_s, - "--published-file", Path.catalog.to_s - ] - pid = spawn(env, *publisher_command_line) - Process.detach(pid) - sleep(1) # wait until the directory is published - - published_dir = Path.published(port) - pid_file = published_dir + ".pid" - - File.open(pid_file.to_s, "w") do |file| - file.puts(pid) - end - end - - def unpublish_catalog - port = @payload["port"] - return unless port - - published_dir = Path.published(port) - pid_file = published_dir + ".pid" - pid = pid_file.read.to_i - - Process.kill("INT", pid) - end - def set_replicas dataset = @payload["dataset"] return unless dataset -------------- next part -------------- HTML����������������������������...Download