make redis url configurable via app config

This commit is contained in:
Maxwell Salzberg 2011-09-07 15:59:38 -07:00
parent fd6981c3d2
commit faa44c0a91
2 changed files with 7 additions and 0 deletions

View file

@ -144,6 +144,8 @@ defaults: &defaults
#Hoptoad api key
hoptoad_api_key: ''
#url for a remote redis, on the default port. Don't forget to restrict IP access!
redis_url: ''
# Use this section to override default settings in specific environments
development:
<<: *defaults

View file

@ -1,5 +1,10 @@
require 'resque'
if !ENV['SINGLE_PROCESS'] && AppConfig[:redis_url]
Resque.redis = Redis.new(:host => AppConfig[:redis_url], :port => 6379)
end
begin
if ENV['SINGLE_PROCESS']
if Rails.env == 'production'