Permalink
Browse files

specify redis db option

  • Loading branch information...
1 parent 00f0e96 commit d3b0540df3e629b1521d3ec763c614537afa8767 @HungYuHei HungYuHei committed May 23, 2012
Showing with 5 additions and 4 deletions.
  1. +3 −3 config/initializers/redis.rb
  2. +2 −1 config/redis.yml.default
@@ -4,8 +4,8 @@
redis_config = YAML.load_file("#{Rails.root}/config/redis.yml")[Rails.env]
-Redis::Objects.redis = Redis.new(:host => redis_config['host'], :port => redis_config['port'])
+Redis::Objects.redis = Redis.new(:host => redis_config['host'], :port => redis_config['port'], :db => redis_config['db'])
Resque::Mailer.default_queue_name = "mailer"
-Resque.redis = Redis.new(:host => redis_config['host'],:port => redis_config['port'])
-Resque.redis.namespace = "resque:ruby-china"
+Resque.redis = Redis.new(:host => redis_config['host'], :port => redis_config['port'], :db => redis_config['db'])
+Resque.redis.namespace = "resque:mg_forum"
View
@@ -2,11 +2,12 @@ defaults: &defaults
host: '127.0.0.1'
port: 6379
redis_search_namespace: 'rc:rs'
+ db: 4
development:
<<: *defaults
test:
<<: *defaults
production:
<<: *defaults
development_mongohq:
- <<: *defaults
+ <<: *defaults

0 comments on commit d3b0540

Please sign in to comment.