1
0
Fork 0
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:
Thorsten Ball 2012-12-11 16:37:22 +01:00
parent 8b2ff6c951
commit 5b450380ff

View file

@ -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