Guard config loader during cache clear
This commit is contained in:
@@ -58,6 +58,8 @@ class InstallationConfig < ApplicationRecord
|
||||
end
|
||||
|
||||
def clear_cache
|
||||
return if ConfigLoader.processing?
|
||||
|
||||
GlobalConfig.clear_cache
|
||||
end
|
||||
|
||||
|
||||
@@ -5,11 +5,12 @@ class ConfigLoader
|
||||
}.freeze
|
||||
|
||||
def self.processing?
|
||||
Thread.current[:config_loader_processing]
|
||||
Thread.current[:config_loader_processing] || @processing
|
||||
end
|
||||
|
||||
def self.processing=(value)
|
||||
Thread.current[:config_loader_processing] = value
|
||||
@processing = value
|
||||
end
|
||||
|
||||
def process(options = {})
|
||||
|
||||
Reference in New Issue
Block a user