Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change RAILS_ROOT to Rails.root as RAILS_ROOT no longer exists in rai…
…ls 3
  • Loading branch information
Corin Langosch committed Jul 27, 2010
1 parent a58b2d8 commit 205e874
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/delayed/command.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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|
Expand All @@ -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)
Expand Down

0 comments on commit 205e874

Please sign in to comment.