mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
WIP Interim save
This commit is contained in:
parent
b0fb2f40cd
commit
7d3f0249dc
6 changed files with 75 additions and 67 deletions
|
@ -1,12 +1,12 @@
|
|||
namespace :verify_email do
|
||||
desc 'Stars verifying email jobs for all the domain'
|
||||
task all_domains: :environment do
|
||||
verifications_by_domain = EmailAddressVerification.not_verified_recently.group_by(&:domain)
|
||||
verifications_by_domain.each do |_domain, verifications|
|
||||
ver = verifications.sample # Verify random email to not to clog the SMTP servers
|
||||
VerifyEmailsJob.perform_later(ver.id)
|
||||
next
|
||||
end
|
||||
# verifications_by_domain = EmailAddressVerification.not_verified_recently.group_by(&:domain)
|
||||
# verifications_by_domain.each do |_domain, verifications|
|
||||
# ver = verifications.sample # Verify random email to not to clog the SMTP servers
|
||||
# VerifyEmailsJob.perform_later(ver.id)
|
||||
# next
|
||||
# end
|
||||
end
|
||||
|
||||
# Need to be run like 'bundle exec rake verify_email:domain['gmail.com']'
|
||||
|
@ -16,8 +16,8 @@ namespace :verify_email do
|
|||
task :domain, [:domain_name] => [:environment] do |_task, args|
|
||||
args.with_defaults(domain_name: 'internet.ee')
|
||||
|
||||
verifications_by_domain = EmailAddressVerification.not_verified_recently
|
||||
.by_domain(args[:domain_name])
|
||||
verifications_by_domain.map { |ver| VerifyEmailsJob.perform_later(ver.id) }
|
||||
# verifications_by_domain = EmailAddressVerification.not_verified_recently
|
||||
# .by_domain(args[:domain_name])
|
||||
# verifications_by_domain.map { |ver| VerifyEmailsJob.perform_later(ver.id) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue