Move a begin/rescue clause to ApplicationSetting.expire
Also, remove non-existing Ci::ApplicationSetting.expire! Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
d777e6f1da
commit
e745e1aae0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue