mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Only reopen log files on USR2 if the logfile option is set
This commit is contained in:
parent
8b2ff6c951
commit
5b450380ff
1 changed files with 4 additions and 2 deletions
|
@ -16,8 +16,10 @@ trap 'USR1' do
|
|||
end
|
||||
|
||||
trap 'USR2' do
|
||||
Sidekiq.logger.info "Received USR2, reopening log file"
|
||||
Sidekiq.logger = Sidekiq::Logging.new_file_logger(Sidekiq.options[:logfile])
|
||||
if Sidekiq.options[:logfile]
|
||||
Sidekiq.logger.info "Received USR2, reopening log file"
|
||||
Sidekiq.logger = Sidekiq::Logging.new_file_logger(Sidekiq.options[:logfile])
|
||||
end
|
||||
end
|
||||
|
||||
trap 'TTIN' do
|
||||
|
|
Loading…
Reference in a new issue