Skip to content

Commit

Permalink
Explicit memcache port
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Jan 6, 2022
1 parent d04f0fd commit cbb0ac6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/heartbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def initialize
end

def memcached_up?
memcached_client = Dalli::Client.new(ENV["MEMCACHE_SERVERS"])
host = ENV["MEMCACHE_SERVERS"] || ENV["HOSTNAME"]
memcached_client = Dalli::Client.new("#{host}:11211")
memcached_client.alive!
true
rescue
Expand Down

0 comments on commit cbb0ac6

Please sign in to comment.