Skip to content

Commit a4a58b4

Browse files
committed
Use REDIS_PROVIDER env var if present
1 parent 1e1fba1 commit a4a58b4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

config/initializers/cache_store.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Coderwall::Application.configure do
2-
config.cache_store = :redis_store, "#{ENV['REDIS_URL']}/#{ENV['REDIS_CACHE_STORE'] || 2}"
2+
config.cache_store = :redis_store, "#{ENV[ENV['REDIS_PROVIDER'] || 'REDIS_URL']}/#{ENV['REDIS_CACHE_STORE'] || 2}"
33
end

config/initializers/redis.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
REDIS = Redis.new(url: ENV['REDIS_URL'])
2-
1+
REDIS = Redis.new(url: ENV[ENV['REDIS_PROVIDER'] || 'REDIS_URL'])

0 commit comments

Comments
 (0)