Guard ConfigLoader against re-entrance
This commit is contained in:
@@ -4,7 +4,18 @@ class ConfigLoader
|
||||
reconcile_only_new: true
|
||||
}.freeze
|
||||
|
||||
def self.processing?
|
||||
Thread.current[:config_loader_processing]
|
||||
end
|
||||
|
||||
def self.processing=(value)
|
||||
Thread.current[:config_loader_processing] = value
|
||||
end
|
||||
|
||||
def process(options = {})
|
||||
return if self.class.processing?
|
||||
|
||||
self.class.processing = true
|
||||
options = DEFAULT_OPTIONS.merge(options)
|
||||
# function of the "reconcile_only_new" flag
|
||||
# if true,
|
||||
@@ -24,6 +35,8 @@ class ConfigLoader
|
||||
|
||||
# default account based feature configs
|
||||
reconcile_feature_config
|
||||
ensure
|
||||
self.class.processing = false
|
||||
end
|
||||
|
||||
def general_configs
|
||||
|
||||
Reference in New Issue
Block a user