remove logs

This commit is contained in:
oleghasjanov 2025-06-04 14:12:00 +03:00
parent f48061a54f
commit 78ffab35c7

View file

@ -85,8 +85,7 @@ class Contact < ApplicationRecord
country_code: country_code) },
mapping: [%w[ident code], %w[ident_type type], %w[ident_country_code country_code]]
# after_save :update_related_whois_records
after_commit :update_related_whois_records
after_save :update_related_whois_records
before_validation :clear_address_modifications, if: -> { !self.class.address_processing? }
# TODO: remove after testing
@ -540,20 +539,13 @@ class Contact < ApplicationRecord
end
def update_related_whois_records
Rails.logger.info "\n\n============ update_related_whois_records ==========="
# not doing anything if no real changes
ignored_columns = %w[updated_at created_at statuses status_notes]
Rails.logger.info "Contact: #{self.inspect}\n"
Rails.logger.info "Saved changes: #{saved_changes}"
# return if saved_changes.slice(*(self.class.column_names - ignored_columns)).empty?
return if (previous_changes.keys - ignored_columns).empty?
names = related_domain_descriptions.keys
Rails.logger.info "names: #{names}"
UpdateWhoisRecordJob.perform_later(names, 'domain') if names.present?
Rails.logger.info "============\n\n"
end
def children_log