diff --git a/config/clock.rb b/config/clock.rb index 7183123f53a..2674495f056 100644 --- a/config/clock.rb +++ b/config/clock.rb @@ -7,6 +7,7 @@ require_relative 'environment' def setup_log Clockwork.configure do |config| + config[:logger].close config[:logger] = Logger.new(ENV["CLOCK_LOG"]) end if ENV["CLOCK_LOG"] end diff --git a/config/logrotate.conf b/config/logrotate.conf index 1b29b530e7c..25d50d0081c 100644 --- a/config/logrotate.conf +++ b/config/logrotate.conf @@ -13,13 +13,15 @@ create 0644 /home/discourse/discourse/log/clockwork.log { postrotate - pkill -f clockwork -HUP + pkill -HUP -f clockwork endscript } /home/discourse/discourse/log/sidekiq.log { + # Should we just kill sidekiq? + # https://github.com/mperham/sidekiq/issues/1008 postrotate - pkill -f sidekiq -USR2 + pkill -USR2 -f sidekiq endscript } /home/discourse/discourse/log/production.log @@ -33,6 +35,6 @@ create 0644 /home/discourse/discourse/log/thin*.log { postrotate - pkill -f 'thin server' -USR1 + pkill -USR1 -f 'thin server' endscript }