From fe38591b0c8587dbf2606f845bb08ae496a67bb5 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 26 Aug 2018 07:15:02 +0200 Subject: [PATCH] disable sqs messages for now --- app/models/concerns/indexable.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index 1054f11c6..03b1e0538 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -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