gracefully handle absence of cache_store.yml

test-plan:

 - don't have a config/cache_store.yml
 - try and boot canvas

Change-Id: I58ceca7bc3b618421e7d66987bbd18b2646babf4
Reviewed-on: https://gerrit.instructure.com/29582
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
This commit is contained in:
Jacob Fugal 2014-02-04 10:58:20 -07:00
parent 9044087ae1
commit ea3af32b50
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ module Canvas
# Setting
require_dependency 'app/models/setting'
@cache_stores = {}
Setting.from_config('cache_store', nil).each do |env, config|
configs = Setting.from_config('cache_store', nil) || {}
configs.each do |env, config|
config = {'cache_store' => 'mem_cache_store'}.merge(config)
case config.delete('cache_store')
when 'mem_cache_store'