[Groonga-commit] droonga/droonga-engine at d9e54d7 [master] Use more meaningful name for path to serf command

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Apr 21 13:02:24 JST 2015


YUKI Hiroshi	2015-04-21 13:02:24 +0900 (Tue, 21 Apr 2015)

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

  Message:
    Use more meaningful name for path to serf command

  Modified files:
    lib/droonga/serf.rb

  Modified: lib/droonga/serf.rb (+6 -6)
===================================================================
--- lib/droonga/serf.rb    2015-04-21 13:00:27 +0900 (7abc6cb)
+++ lib/droonga/serf.rb    2015-04-21 13:02:24 +0900 (8a41bd3)
@@ -43,7 +43,7 @@ module Droonga
     include Loggable
 
     def initialize(name, options={})
-      @serf = nil
+      @serf_command = nil
       @name = NodeName.parse(name)
       @verbose = options[:verbose] || false
       @service_installation = ServiceInstallation.new
@@ -59,7 +59,7 @@ module Droonga
       end
       tags_file = self.class.tags_file
       FileUtils.mkdir_p(tags_file.dirname)
-      agent = Agent.new(loop, @serf,
+      agent = Agent.new(loop, @serf_command,
                         @name.host, agent_port, rpc_port,
                         "-node", @name.to_s,
                         "-event-handler", "droonga-engine-serf-event-handler",
@@ -232,11 +232,11 @@ module Droonga
 
     private
     def ensure_serf
-      @serf ||= find_system_serf
-      return if @serf
+      @serf_command ||= find_system_serf
+      return if @serf_command
 
       serf_path = self.class.path
-      @serf = serf_path.to_s
+      @serf_command = serf_path.to_s
       return if serf_path.executable?
       downloader = Downloader.new(serf_path)
       downloader.download
@@ -253,7 +253,7 @@ module Droonga
 
     def run_command(command, *options)
       ensure_serf
-      command = Command.new(@serf, command,
+      command = Command.new(@serf_command, command,
                             "-rpc-addr", rpc_address,
                             *options)
       command.verbose = @verbose
-------------- next part --------------
HTML����������������������������...
Download 



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