From cbb0ac60e5166707b98ce7d8e6b8edd8ce49c308 Mon Sep 17 00:00:00 2001 From: Richard Hallett Date: Thu, 6 Jan 2022 10:31:48 +0100 Subject: [PATCH] Explicit memcache port --- app/models/heartbeat.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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