diff --git a/app/controllers/api/providers_controller.rb b/app/controllers/api/providers_controller.rb index 0e5fa18664..6341a6e8da 100644 --- a/app/controllers/api/providers_controller.rb +++ b/app/controllers/api/providers_controller.rb @@ -141,15 +141,11 @@ def provider_options(type) end def permitted_subclasses - ActiveSupport::Dependencies.interlock.loading do - ManageIQ::Providers::BaseManager.permitted_subclasses - end + ManageIQ::Providers::BaseManager.permitted_subclasses end def supported_types_for_create - ActiveSupport::Dependencies.interlock.loading do - ExtManagementSystem.supported_types_for_create - end + ExtManagementSystem.supported_types_for_create end def providers_options diff --git a/lib/api/environment.rb b/lib/api/environment.rb index e82902483c..0df075dde8 100644 --- a/lib/api/environment.rb +++ b/lib/api/environment.rb @@ -24,14 +24,10 @@ def self.encrypted_attributes_whitelist def self.time_attributes @time_attributes ||= ApiConfig.collections.each.with_object(Set.new(%w(expires_on))) do |(_, cspec), result| next if cspec[:klass].blank? - klass = nil - - # Ensure we're the only thread trying to autoload classes and their columns - ActiveSupport::Dependencies.interlock.loading do - klass = cspec[:klass].constantize - klass.columns_hash.each do |name, typeobj| - result << name if %w(date datetime).include?(typeobj.type.to_s) - end + + klass = cspec[:klass].constantize + klass.columns_hash.each do |name, typeobj| + result << name if %w(date datetime).include?(typeobj.type.to_s) end end end