1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Ignore network issues with heartbeat, fixes #1586

This commit is contained in:
Mike Perham 2014-03-21 20:27:11 -07:00
parent edbcde1b6e
commit cfeafceb67

View file

@ -145,13 +145,16 @@ module Sidekiq
private
def (key, data)
watchdog('heartbeat') do
begin
Sidekiq.redis do |conn|
conn.multi do
conn.hmset(key, 'busy', @busy.size, 'beat', Time.now.to_f)
conn.expire(key, 60)
end
end
rescue => e
# ignore all redis/network issues
logger.error("heartbeat: #{e.message}")
end
end