updated emails

This commit is contained in:
olegphenomenon 2021-11-05 12:09:04 +02:00
parent 59fb12b840
commit c29a35fffb
3 changed files with 40 additions and 7 deletions

View file

@ -57,10 +57,15 @@ def prepare_contacts(options)
time = Time.zone.now - ValidationEvent::VALIDATION_PERIOD
validation_events_ids = ValidationEvent.where('created_at > ?', time).pluck(:validation_eventable_id)
# Contact.where.not(id: validation_events_ids) + Contact.where(id: failed_contacts)
Contact.where.not(id: validation_events_ids)
end
end
def failed_contacts
ValidationEvent.failed.pluck(:id)
end
def contacts_by_domain(domain_name)
domain = ::Domain.find_by(name: domain_name)
return unless domain