summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-11-26 07:55:21 -0800
committerStan Hu <stanhu@gmail.com>2015-11-26 07:55:21 -0800
commit78c1ab40e20f2c412719a2140d9de61ada26d1b8 (patch)
tree1371ea5e29a7a25951998de199a7c0ced9ee9436 /config
parente55473ad6880a68a86f355b7825dbdaf67e1f375 (diff)
downloadgitlab-ce-78c1ab40e20f2c412719a2140d9de61ada26d1b8.tar.gz
Gracefully handle when Redis is not available
Diffstat (limited to 'config')
-rw-r--r--config/initializers/1_settings.rb9
1 files 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