Guard ConfigLoader against re-entrance

This commit is contained in:
Sojan Jose
2026-01-16 00:19:36 -08:00
parent 1748c668cf
commit 45533f6bf8
+13
View File
@@ -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