Permalink
Browse files

Change RAILS_ROOT to Rails.root as RAILS_ROOT no longer exists in rai…

…ls 3
  • Loading branch information...
1 parent a58b2d8 commit 205e874a9c596c49bf7e7bf7f99721158c46d958 Corin Langosch committed Jul 27, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/delayed/command.rb
View
@@ -10,7 +10,7 @@ def initialize(args)
@files_to_reopen = []
@options = {
:quiet => true,
- :pid_dir => "#{RAILS_ROOT}/tmp/pids"
+ :pid_dir => "#{Rails.root}/tmp/pids"
}
@worker_count = 1
@@ -80,7 +80,7 @@ def run_process(process_name, dir)
end
def run(worker_name = nil)
- Dir.chdir(RAILS_ROOT)
+ Dir.chdir(Rails.root)
# Re-open file handles
@files_to_reopen.each do |file|
@@ -91,7 +91,7 @@ def run(worker_name = nil)
end
end
- Delayed::Worker.logger = Logger.new(File.join(RAILS_ROOT, 'log', 'delayed_job.log'))
+ Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'delayed_job.log'))
Delayed::Worker.backend.after_fork
worker = Delayed::Worker.new(@options)

0 comments on commit 205e874

Please sign in to comment.