Skip to content

Commit

Permalink
Merge pull request #1147 from datacite/remove-request-time-indexing
Browse files Browse the repository at this point in the history
Remove request-time indexing to ES
  • Loading branch information
digitaldogsbody committed Mar 8, 2024
2 parents 5bfd6fd + 8afb03b commit 3903012
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/models/concerns/helpable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,15 @@ def register_url
# update minted column after first successful registration in handle system

if [200, 201].include?(response.status)
success = true
if minted.blank?
success = update(minted: Time.zone.now, updated: Time.zone.now)
update(minted: Time.zone.now, updated: Time.zone.now)
end
unless Rails.env.test?

unless Rails.env.test?
Rails.logger.debug "[Handle] URL for DOI " + doi + " updated to " +
url +
"."
end

__elasticsearch__.index_document if success
elsif response.status == 404
Rails.logger.info "[Handle] Error updating URL for DOI " + doi +
": not found"
Expand Down

0 comments on commit 3903012

Please sign in to comment.