Skip to content

Commit

Permalink
disable sqs messages for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 26, 2018
1 parent 340c1af commit fe38591
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ module Indexable
# use index_document instead of update_document to also update virtual attributes
IndexJob.perform_later(self)
if self.class.name == "Doi" && !Rails.env.test?
index_interval = (Time.zone.now - updated_at).to_i
index_interval = (Time.zone.now - updated_at)
logger = Logger.new(STDOUT)
logger.info "[Elasticsearch] Indexing of DOI #{doi} finished #{index_interval.to_s} seconds after DOI update."

send_import_message(self.to_jsonapi)
# send_import_message(self.to_jsonapi)
end
end

before_destroy do
begin
__elasticsearch__.delete_document
send_delete_message(self.to_jsonapi) if self.class.name == "Doi" && !Rails.env.test?
# send_delete_message(self.to_jsonapi) if self.class.name == "Doi" && !Rails.env.test?
rescue Elasticsearch::Transport::Transport::Errors::NotFound
nil
end
Expand Down

0 comments on commit fe38591

Please sign in to comment.