Skip to content

Commit

Permalink
Remove obsolete feature flag read_folio
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jul 5, 2024
1 parent 6df5a6e commit 7a72ada
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
10 changes: 3 additions & 7 deletions config/initializers/okcomputer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ def version_from_version_file

class FolioCheck < OkComputer::Check
def check
if Settings.enabled_features.read_folio
Timeout.timeout(5) do
Catalog::FolioReader.to_marc(barcode: '12345')
end
else
mark_message 'folio disabled'
Timeout.timeout(5) do
Catalog::FolioReader.to_marc(barcode: '12345')
end
rescue StandardError => e
mark_failure
Expand Down Expand Up @@ -98,6 +94,6 @@ def check

OkComputer::Registry.register 'rabbit-queues', RabbitQueueExistsCheck.new(['dsa.create-event', 'dor.indexing-by-druid']) if Settings.rabbitmq.enabled

OkComputer.make_optional %w(external-folio) if Settings.enabled_features.read_folio
OkComputer.make_optional %w(external-folio)

OkComputer::Registry.register 'external-solr', OkComputer::HttpCheck.new("#{Settings.solr.url.gsub(%r{/$}, '')}/admin/ping")
2 changes: 0 additions & 2 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ enabled_features:
create_ur_admin_policy: false
datacite_update: false
file_hierarchy_validation: true
read_folio: true
orcid_update: true
publish_shelve: false


# Ur Admin Policy
ur_admin_policy:
druid: druid:hv992ry2431
Expand Down
1 change: 0 additions & 1 deletion spec/requests/status_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
describe 'for Folio connection' do
before do
allow(Catalog::FolioReader).to receive(:to_marc).and_return('some marc stuff')
allow(Settings.enabled_features).to receive(:read_folio).and_return(true)
end

it 'is successful' do
Expand Down
2 changes: 0 additions & 2 deletions spec/services/goobi_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@
end

context 'when folio enabled' do
before { allow(Settings.enabled_features).to receive(:read_folio).and_return(true) }

context 'without ocr tag present' do
let(:tags) { ['DPG : Workflow : book_workflow & stuff', 'Process : Content Type : Book', 'LAB : MAPS'] }

Expand Down

0 comments on commit 7a72ada

Please sign in to comment.