Skip to content

Commit

Permalink
Added more logs (#1084)
Browse files Browse the repository at this point in the history
* Added more logs

* added more logs
  • Loading branch information
ashwinisukale authored Jan 10, 2024
1 parent 876e15c commit 02577d9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ 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"
Rails.logger.info "[Event Data Import Message] its a DOI #{aasm_state} #{to_jsonapi} "
if aasm_state == "findable"
changed_attributes = saved_changes
Rails.logger.info "[Event Data Import Message] #{aasm_state} #{changed_attributes.inspect} before call"
Rails.logger.info "[Event Data Import Message] changes -- #{aasm_state} -- #{changes}"
Rails.logger.info "[Event Data Import Message] saved_changes -- #{aasm_state} -- #{saved_changes}"
relevant_changes = changed_attributes.keys & %w[related_identifiers creators funding_references aasm_state]
Rails.logger.info "[Event Data Import Message] before call -- #{aasm_state} -- #{relevant_changes} --- #{(created == updated)}"
Rails.logger.info "[Event Data Import Message] dates -- #{aasm_state} -- #{created} --- #{updated} "
if relevant_changes.any? || (created == updated)
send_import_message(to_jsonapi)
Rails.logger.info "[Event Data Import Message] #{aasm_state} #{to_jsonapi.inspect} send to Event Data service."
Rails.logger.info "[Event Data Import Message] send to Event Data service. #{aasm_state} #{to_jsonapi} "
end
end
elsif instance_of?(Event)
Expand Down

0 comments on commit 02577d9

Please sign in to comment.