Permalink
Browse files

Merge pull request #2022 from simonoff/master

Resque must be running in the own namespace
  • Loading branch information...
2 parents 752468b + 18bc873 commit 68b119f62f572048a9ec967d6e3280c0483f2753 @randx randx committed Nov 20, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 config/initializers/4_resque.rb
@@ -1,13 +1,11 @@
# Custom Redis configuration
-rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
-rails_env = ENV['RAILS_ENV'] || 'development'
-config_file = File.join(rails_root, 'config', 'resque.yml')
+config_file = Rails.root.join('config', 'resque.yml')
if File.exists?(config_file)
resque_config = YAML.load_file(config_file)
- Resque.redis = resque_config[rails_env]
+ Resque.redis = resque_config[Rails.env]
end
-
+Resque.redis.namespace = 'resque:gitlab'
# Queues
Resque.watch_queue(PostReceive.instance_variable_get("@queue"))

0 comments on commit 68b119f

Please sign in to comment.