From 78c1ab40e20f2c412719a2140d9de61ada26d1b8 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 26 Nov 2015 07:55:21 -0800 Subject: [PATCH] Gracefully handle when Redis is not available --- config/initializers/1_settings.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 80b480eac37..444e91109df 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -295,5 +295,10 @@ if Rails.env.test? end # Force a refresh of application settings at startup -ApplicationSetting.expire -Ci::ApplicationSetting.expire +begin + ApplicationSetting.expire + Ci::ApplicationSetting.expire +rescue + # Gracefully handle when Redis is not available. For example, + # omnibus may fail here during assets:precompile. +end