YUKI Hiroshi
null+****@clear*****
Tue Apr 21 14:16:40 JST 2015
YUKI Hiroshi 2015-04-21 14:16:40 +0900 (Tue, 21 Apr 2015) New Revision: e90a13e7b4f544faae5a9f9ce9d67e68cc990dcc https://github.com/droonga/droonga-engine/commit/e90a13e7b4f544faae5a9f9ce9d67e68cc990dcc Message: Define path to serf related files in Path module, for other modules Modified files: lib/droonga/path.rb lib/droonga/serf.rb Modified: lib/droonga/path.rb (+8 -0) =================================================================== --- lib/droonga/path.rb 2015-04-21 13:34:01 +0900 (e245d7d) +++ lib/droonga/path.rb 2015-04-21 14:16:40 +0900 (cc62bd4) @@ -74,6 +74,14 @@ module Droonga state + "buffer" + "intentional" end + def serf_command + base + "serf" + end + + def serf_tags_file + state + "serf-tags.json" + end + def serf_event_handler_errors state + "serf-event-handler-errors" end Modified: lib/droonga/serf.rb (+2 -12) =================================================================== --- lib/droonga/serf.rb 2015-04-21 13:34:01 +0900 (9c24cdd) +++ lib/droonga/serf.rb 2015-04-21 14:16:40 +0900 (a9e7c8d) @@ -30,16 +30,6 @@ require "droonga/restarter" module Droonga class Serf - class << self - def path - Droonga::Path.base + "serf" - end - - def tags_file - Droonga::Path.state + "serf-tags.json" - end - end - include Loggable def initialize(name, options={}) @@ -57,7 +47,7 @@ module Droonga detect_other_hosts.each do |other_host| retry_joins.push("-retry-join", other_host) end - tags_file = self.class.tags_file + tags_file = Droonga::Path.serf_tags_file FileUtils.mkdir_p(tags_file.dirname) agent = Agent.new(loop, @serf_command, @name.host, agent_port, rpc_port, @@ -235,7 +225,7 @@ module Droonga @serf_command ||= find_system_serf return if @serf_command - serf_path = self.class.path + serf_path = Droonga::Path.serf_command @serf_command = serf_path.to_s return if serf_path.executable? downloader = Downloader.new(serf_path) -------------- next part -------------- HTML����������������������������...다운로드