Commit e745e1aa 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 d777e6f1
......@@ -199,6 +199,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
......
......@@ -419,10 +419,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