Skip to content

Commit

Permalink
don't trigger reindexing of dois. #390
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Feb 4, 2020
1 parent ca71f26 commit f54b3a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ module Indexable
if self.class.name == "Doi"
update_column(:indexed, Time.zone.now)
send_import_message(self.to_jsonapi) if aasm_state == "findable" && !Rails.env.test? && !%w(crossref medra kisti jalc op).include?(client.symbol.downcase.split(".").first)
elsif self.class.name == "Event"
# reindex dois associated with Event
@source_doi = Doi.where(doi: source_doi).first if source_doi
IndexJob.perform_later(@source_doi) if @source_doi
# elsif self.class.name == "Event"
# # reindex dois associated with Event
# @source_doi = Doi.where(doi: source_doi).first if source_doi
# IndexJob.perform_later(@source_doi) if @source_doi

@target_doi = Doi.where(doi: target_doi).first if target_doi
IndexJob.perform_later(@target_doi) if @target_doi
# @target_doi = Doi.where(doi: target_doi).first if target_doi
# IndexJob.perform_later(@target_doi) if @target_doi
end
end

Expand Down

0 comments on commit f54b3a0

Please sign in to comment.