Skip to content

Commit

Permalink
Merge f0fcb1a into 7182711
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jan 27, 2020
2 parents 7182711 + f0fcb1a commit 099d286
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 12 additions & 0 deletions config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,21 @@ def self.connect_dor_services_app
Dor::Services::Client.configure(url: Settings.dor_services.url,
token: Settings.dor_services.token)
end

# Disable Solr updates (by defaualt ActiveFedora updates Solr automatically).
# We let activemq messages from Fedora which are received by dor-indexing-app handle this
# Cannot just do:
# ::ENABLE_SOLR_UPDATES = false
# Because "warning: already initialized constant ENABLE_SOLR_UPDATES".
# ActiveFedora assigns a default (if unassigned) and we cannot pre-empt it from here.
def self.disable_solr_updates
Object.send(:remove_const, 'ENABLE_SOLR_UPDATES') if self.class.const_defined?('ENABLE_SOLR_UPDATES')
Object.const_set('ENABLE_SOLR_UPDATES', false)
end
end

CommonAccessioning.connect_dor_services_app
CommonAccessioning.disable_solr_updates

Preservation::Client.configure(url: Settings.preservation_catalog.url, token: Settings.preservation_catalog.token)

Expand Down
2 changes: 0 additions & 2 deletions lib/robots/dor_repo/accession/embargo_release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ module Robots
module DorRepo
module Accession
class EmbargoRelease
# Turn off active_fedora updates of solr
ENABLE_SOLR_UPDATES = false
LyberCore::Log.set_logfile(File.join(ROBOT_ROOT, 'log', 'embargo_release.log'))
# Finds druids from solr based on the passed in query
# It will then load each item from Dor, and call the block with the item
Expand Down

0 comments on commit 099d286

Please sign in to comment.