Skip to content
Browse files

Updating Resque initializer

  • Loading branch information...
1 parent 1430ab7 commit ebb5239bb1980af670262a8a93584fabc93942a7 @chewbranca chewbranca committed Jun 23, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 config/initializers/resque.rb
View
6 config/initializers/resque.rb
@@ -1,10 +1,10 @@
-rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
+rails_root = ENV['RAILS_ROOT'] || File.expand_path(File.dirname(__FILE__) + '/../..')
rails_env = ENV['RAILS_ENV'] || 'development'
resque_config = YAML.load_file(rails_root + '/config/resque.yml')
Resque.redis = resque_config[rails_env]
-app_name = RAILS_ROOT =~ %r(/([^/]+)/(current|release)) ? $1 : nil
+app_name = rails_root =~ %r(/([^/]+)/(current|release)) ? $1 : nil
Resque.redis.namespace = "resque:#{app_name}" if app_name
-PFEED_RESQUE_KLASS = NotificationWorker
+PFEED_RESQUE_KLASS = NotificationWorker if defined? NotificationWorker

0 comments on commit ebb5239

Please sign in to comment.
Something went wrong with that request. Please try again.