Commit 3c058319 authored by Rémy Coutable's avatar Rémy Coutable

Move a begin/rescue clause to ApplicationSetting.expire

Also, remove non-existing Ci::ApplicationSetting.expire!
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent aa9a5e8c
......@@ -218,6 +218,9 @@ class ApplicationSetting < ActiveRecord::Base
def self.expire
Rails.cache.delete(CACHE_KEY)
rescue
# Gracefully handle when Redis is not available. For example,
# omnibus may fail here during assets:precompile.
end
def self.cached
......
......@@ -531,10 +531,4 @@ if Rails.env.test?
end
# Force a refresh of application settings at startup
begin
ApplicationSetting.expire
Ci::ApplicationSetting.expire
rescue
# Gracefully handle when Redis is not available. For example,
# omnibus may fail here during assets:precompile.
end
ApplicationSetting.expire
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment