diff --git a/app/interactions/actions/contact_update.rb b/app/interactions/actions/contact_update.rb index bfa3f3b7c..2cd6303ef 100644 --- a/app/interactions/actions/contact_update.rb +++ b/app/interactions/actions/contact_update.rb @@ -37,11 +37,18 @@ module Actions end def maybe_filtering_old_failed_records - validation_events = contact.validation_events - return unless validation_events.count > 1 + # validation_events = contact.validation_events + # return unless validation_events.count > 1 - validation_events.order!(created_at: :asc) - validation_events.first.destroy while validation_events.count >= 1 + # validation_events.order!(created_at: :asc) + # validation_events.first.destroy while validation_events.count >= 1 + + if contact.validation_events.count > 1 + contact.validation_events.order!(created_at: :asc) + while contact.validation_events.count >= 1 + contact.validation_events.first.destroy + end + end end def maybe_remove_address diff --git a/lib/tasks/verify_email.rake b/lib/tasks/verify_email.rake index b90fde0d6..0f79e269e 100644 --- a/lib/tasks/verify_email.rake +++ b/lib/tasks/verify_email.rake @@ -4,7 +4,7 @@ require 'syslog/logger' require 'active_record' namespace :verify_email do - # bundle exec rake verify_email:check_all -- --domain_name=shop.test --check_level=mx --spam_protect=true + # bundle exec rake verify_email:check_all -- --check_level=mx --spam_protect=true # bundle exec rake verify_email:check_all -- -dshop.test -cmx -strue desc 'Starts verifying email jobs with optional check level and spam protection' task check_all: :environment do