mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 07:36:41 +10:00
Add an initializer to allow custom Resque configs
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
|
||||
rails_env = ENV['RAILS_ENV'] || 'development'
|
||||
config_file = File.join(rails_root, 'config', 'resque.yml')
|
||||
|
||||
if File.exists?(config_file)
|
||||
resque_config = YAML.load_file(config_file)
|
||||
Resque.redis = resque_config[rails_env]
|
||||
end
|
||||
Reference in New Issue
Block a user