mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
FEATURE: add support for SIGTSTP which stops sidekiqs
Out of the box this signal "suspends" the process, but we already use usr1 and usr2 and this is for an edge case where the end user suspends it by typing "stop"
This commit is contained in:
parent
39cb0ae108
commit
f9f38873a2
@ -77,6 +77,11 @@ before_fork do |server, worker|
|
||||
|
||||
Demon::Sidekiq.start(sidekiqs)
|
||||
|
||||
Signal.trap("SIGTSTP") do
|
||||
STDERR.puts "#{Time.now}: Issuing stop to sidekiq"
|
||||
Demon::Sidekiq.stop
|
||||
end
|
||||
|
||||
class ::Unicorn::HttpServer
|
||||
alias :master_sleep_orig :master_sleep
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user