diff --git a/app/models/import_job.rb b/app/models/import_job.rb index 16bae41c4..335fd2a06 100644 --- a/app/models/import_job.rb +++ b/app/models/import_job.rb @@ -109,15 +109,7 @@ class ImportJob < ApplicationModel # # return [nil] def self.queue_registered - import_backends = Setting.get('import_backends') - return if import_backends.blank? - - import_backends.each do |backend| - - if !backend_valid?(backend) - Rails.logger.error "Invalid import backend '#{backend}'" - next - end + backends.each do |backend| # skip backends that are not "ready" yet next if !backend.constantize.queueable? diff --git a/spec/models/import_job_spec.rb b/spec/models/import_job_spec.rb index 0f5f88f34..a99d029a4 100644 --- a/spec/models/import_job_spec.rb +++ b/spec/models/import_job_spec.rb @@ -120,7 +120,7 @@ RSpec.describe ImportJob do it 'logs errors for invalid registered backends' do allow(Setting).to receive(:get) expect(Setting).to receive(:get).with('import_backends').and_return(['InvalidBackend']) - expect(Rails.logger).to receive(:error) + expect(described_class.logger).to receive(:error) described_class.queue_registered end