Add nonverified color email to registrar index

This commit is contained in:
Alex Sherman 2020-06-09 15:51:51 +05:00
parent af7e0f266d
commit e95996fa12
7 changed files with 29 additions and 5 deletions

View file

@ -2,13 +2,12 @@ namespace :verify_email do
desc 'Stars verifying email jobs'
task all_domains: :environment do
verifications_by_domain = EmailAddressVerification.not_verified_recently.group_by(&:domain)
verifications_by_domain.each do |domain, verifications|
next if domain == 'not_found'
ver = verifications[0] # Only first email to not to clog the SMTP servers
ver = verifications.sample # Verify random email to not to clog the SMTP servers
VerifyEmailsJob.enqueue(ver.id)
# VerifyEmailsJob.run(ver.id)
next
end
end
end