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:
parent
edbcde1b6e
commit
cfeafceb67
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue