From d461d90260b8db3edcc14b3384c617b720fef935 Mon Sep 17 00:00:00 2001
From: Ashwini Sukale <ashwini.sukale@datacite.org>
Date: Mon, 8 Jan 2024 17:19:21 +0530
Subject: [PATCH] These logs will be removed - Added just for testing on stage
 (#1082)

---
 app/models/concerns/indexable.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb
index 0a350673b..d8ef54a57 100644
--- a/app/models/concerns/indexable.rb
+++ b/app/models/concerns/indexable.rb
@@ -7,6 +7,7 @@ module Indexable
 
   included do
     after_commit on: %i[create update] do
+      Rails.logger.info "[Event Data Import Message] After commit"
       # use index_document instead of update_document to also update virtual attributes
       unless %w[Prefix ProviderPrefix ClientPrefix].include?(self.class.name)
         IndexJob.perform_later(self)
@@ -21,8 +22,10 @@ module Indexable
       end
 
       if instance_of?(DataciteDoi) || instance_of?(OtherDoi) || instance_of?(Doi)
+        Rails.logger.info "[Event Data Import Message] #{aasm_state} #{to_jsonapi.inspect} its a DOI"
         if aasm_state == "findable"
           changed_attributes = saved_changes
+          Rails.logger.info "[Event Data Import Message] #{aasm_state} #{changed_attributes.inspect} before call"
           relevant_changes = changed_attributes.keys & %w[related_identifiers creators funding_references aasm_state]
           if relevant_changes.any?
             send_import_message(to_jsonapi)