diff options
Diffstat (limited to 'lib/rainbows/base.rb')
-rw-r--r-- | lib/rainbows/base.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index e0c99e9..41daa2d 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -36,5 +36,12 @@ module Rainbows::Base klass.const_set :LISTENERS, Rainbows::HttpServer::LISTENERS end + def reopen_worker_logs(worker_nr) + logger.info "worker=#{worker_nr} reopening logs..." + Unicorn::Util.reopen_logs + logger.info "worker=#{worker_nr} done reopening logs" + rescue + Rainbows.quit! # let the master reopen and refork us + end # :startdoc: end |