mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FEATURE: unicorn sidekiq will restart sidekiq on complete failure.
(checks every 30 minutes for complete failure)
This commit is contained in:
@ -17,6 +17,14 @@ class Demon::Base
|
||||
end
|
||||
end
|
||||
|
||||
def self.restart
|
||||
return unless @demons
|
||||
@demons.values.each do |demon|
|
||||
demon.stop
|
||||
demon.start
|
||||
end
|
||||
end
|
||||
|
||||
def self.ensure_running
|
||||
@demons.values.each do |demon|
|
||||
demon.ensure_running
|
||||
@ -39,6 +47,7 @@ class Demon::Base
|
||||
if @pid
|
||||
Process.kill("HUP",@pid)
|
||||
@pid = nil
|
||||
@started = false
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user