updated: also validated contacts which was failed without any time limits

This commit is contained in:
olegphenomenon 2021-11-11 14:24:02 +02:00
parent 8b9fbafeb4
commit 5ea5dd7197
4 changed files with 44 additions and 21 deletions

View file

@ -25,7 +25,6 @@ class VerifyEmailsJob < ApplicationJob
contact_ids = Contact.where(email: contact.email).where('created_at > ?', time).pluck(:id)
r = ValidationEvent.where(validation_eventable_id: contact_ids).order(created_at: :desc)
# return false if r[0].success == false
r.present?
end

View file

@ -12,7 +12,7 @@ class ValidationEvent < ApplicationRecord
INVALID_EVENTS_COUNT_BY_LEVEL = {
regex: 1,
mx: 5,
mx: 2,
smtp: 1,
}.freeze