Skip to content

Commit

Permalink
serf: cache found serf path
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 5, 2015
1 parent 7d4033f commit c75059c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/droonga/serf.rb
Expand Up @@ -37,6 +37,7 @@ def path
include Loggable

def initialize(name)
@serf = nil
@name = name
@service_installation = ServiceInstallation.new
end
Expand Down Expand Up @@ -161,7 +162,7 @@ def cluster_id

private
def ensure_serf
@serf = find_system_serf
@serf ||= find_system_serf
return if @serf

serf_path = self.class.path
Expand Down

0 comments on commit c75059c

Please sign in to comment.