mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Reopen log file after receiving USR2 signal
This commit is contained in:
parent
d2c2da6be9
commit
8b2ff6c951
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,11 @@ trap 'USR1' do
|
|||
mgr.async.stop if mgr
|
||||
end
|
||||
|
||||
trap 'USR2' do
|
||||
Sidekiq.logger.info "Received USR2, reopening log file"
|
||||
Sidekiq.logger = Sidekiq::Logging.new_file_logger(Sidekiq.options[:logfile])
|
||||
end
|
||||
|
||||
trap 'TTIN' do
|
||||
Thread.list.each do |thread|
|
||||
Sidekiq.logger.info "Thread TID-#{thread.object_id.to_s(36)} #{thread['label']}"
|
||||
|
|
Loading…
Reference in a new issue