mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: queue heartbeats in readonly modes
If sidekiq is paused or Discourse is in readonly continue to queue heartbeats If we do not do that then a master process can end up reaping sidekiq workers and causing various badness This also impacts restore which can do weird stuff TM in cases like this
This commit is contained in:
@ -74,7 +74,7 @@ class Sidekiq::Pausable
|
||||
end
|
||||
|
||||
def call(worker, msg, queue)
|
||||
if Sidekiq.paused?
|
||||
if Sidekiq.paused? && !(Jobs::RunHeartbeat === worker)
|
||||
worker.class.perform_in(@delay, *msg['args'])
|
||||
else
|
||||
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
||||
|
Reference in New Issue
Block a user