Skip to content
Snippets Groups Projects
Commit e745e1aa authored by Rémy Coutable's avatar Rémy Coutable
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
@@ -199,6 +199,9 @@ class ApplicationSetting < ActiveRecord::Base
Loading
@@ -199,6 +199,9 @@ class ApplicationSetting < ActiveRecord::Base
   
def self.expire def self.expire
Rails.cache.delete(CACHE_KEY) Rails.cache.delete(CACHE_KEY)
rescue
# Gracefully handle when Redis is not available. For example,
# omnibus may fail here during assets:precompile.
end end
   
def self.cached def self.cached
Loading
Loading
Loading
@@ -419,10 +419,4 @@ if Rails.env.test?
Loading
@@ -419,10 +419,4 @@ if Rails.env.test?
end end
   
# Force a refresh of application settings at startup # Force a refresh of application settings at startup
begin ApplicationSetting.expire
ApplicationSetting.expire
Ci::ApplicationSetting.expire
rescue
# Gracefully handle when Redis is not available. For example,
# omnibus may fail here during assets:precompile.
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment