diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-09-18 21:45:09 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-09-18 21:45:09 -0400 |
commit | bfed07ee20d5df75e444994912edda48839acbac (patch) | |
tree | 796f5c57de40d041c9f13a9e517bd27b0fec7766 | |
parent | 4ecf23d2ad4f401c94fabeb061cc36c487276d33 (diff) | |
download | gitlab-ce-bfed07ee20d5df75e444994912edda48839acbac.tar.gz |
Add an initializer to allow custom Resque configs
-rw-r--r-- | config/initializers/resque.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/initializers/resque.rb b/config/initializers/resque.rb new file mode 100644 index 00000000000..b333ceeea1a --- /dev/null +++ b/config/initializers/resque.rb @@ -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 |