diff --git a/app/models/heartbeat.rb b/app/models/heartbeat.rb index f369636..acf266b 100644 --- a/app/models/heartbeat.rb +++ b/app/models/heartbeat.rb @@ -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