Clean old rails2 style code

This commit is contained in:
Alexander Simonov 2012-11-20 18:57:45 +02:00
parent ebcbe0c87b
commit 10d8b77b50

View file

@ -1,11 +1,9 @@
# Custom Redis configuration # Custom Redis configuration
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..' config_file = Rails.root.join('config', 'resque.yml')
rails_env = ENV['RAILS_ENV'] || 'development'
config_file = File.join(rails_root, 'config', 'resque.yml')
if File.exists?(config_file) if File.exists?(config_file)
resque_config = YAML.load_file(config_file) resque_config = YAML.load_file(config_file)
Resque.redis = resque_config[rails_env] Resque.redis = resque_config[Rails.env]
end end
# Queues # Queues