Revert "Revert "FIX: Heartbeat check per sidekiq process (#7873)""

This reverts commit e805d449653ea5264068bd9fed4b977aa89319bf.
We now have mechanisms in place to ensure heartbeat will always
be scheduled even if the scheduler is overloaded per: 098f938b
This commit is contained in:
Sam Saffron
2019-08-30 10:12:10 +10:00
parent ff8cc244d8
commit c3497559be
6 changed files with 76 additions and 34 deletions

View File

@ -11,6 +11,7 @@ class Demon::Base
def self.start(count = 1, verbose: false)
@demons ||= {}
before_start(count)
count.times do |i|
(@demons["#{prefix}_#{i}"] ||= new(i, verbose: verbose)).start
end
@ -37,7 +38,10 @@ class Demon::Base
end
end
attr_reader :pid, :parent_pid, :started, :index
def self.before_start(count)
end
attr_reader :pid, :parent_pid, :started, :index, :identifier
attr_accessor :stop_timeout
def initialize(index, rails_root: nil, parent_pid: nil, verbose: false)