Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reopen files to their original path. Create new logger for delayed_jo…

…b.log
  • Loading branch information...
commit 9c8427615e3b56fa6d3a5b4ca816d284927bb240 1 parent 82809a0
@bkeepers bkeepers authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/delayed/command.rb
View
7 lib/delayed/command.rb
@@ -79,16 +79,13 @@ def run(worker_name = nil)
# Re-open file handles
@files_to_reopen.each do |file|
begin
- file.reopen File.join(RAILS_ROOT, 'log', 'delayed_job.log'), 'a+'
+ file.reopen file.path
file.sync = true
rescue ::Exception
end
end
- Delayed::Worker.logger = Rails.logger
- if Delayed::Worker.logger.respond_to? :auto_flushing=
- Delayed::Worker.logger.auto_flushing = true
- end
+ Delayed::Worker.logger = Logger.new(File.join(RAILS_ROOT, 'log', 'delayed_job.log'))
Delayed::Worker.backend.after_fork
worker = Delayed::Worker.new(@options)
Please sign in to comment.
Something went wrong with that request. Please try again.