mirror of
https://github.com/internetee/registry.git
synced 2025-08-30 13:03:01 +02:00
Task remove all old validation event records
This commit is contained in:
parent
bbc1380e46
commit
4dcd6d765c
5 changed files with 28 additions and 53 deletions
|
@ -20,11 +20,11 @@ namespace :verify_email do
|
|||
hash: opts_hash)
|
||||
email_contacts = prepare_contacts(options)
|
||||
email_contacts.each do |email|
|
||||
VerifyEmailsJob.set(wait_until: spam_protect_timeout(options)).perform_later(
|
||||
email: email,
|
||||
check_level: check_level(options)
|
||||
)
|
||||
VerifyEmailsJob.set(wait_until: spam_protect_timeout(options))
|
||||
.perform_later(email: email, check_level: check_level(options))
|
||||
end
|
||||
|
||||
ValidationEvent.old_records.destroy_all
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -40,10 +40,6 @@ def spam_protect_timeout(options)
|
|||
spam_protect(options) ? 0.seconds : SPAM_PROTECT_TIMEOUT
|
||||
end
|
||||
|
||||
def logger
|
||||
@logger ||= ActiveSupport::TaggedLogging.new(Syslog::Logger.new('registry'))
|
||||
end
|
||||
|
||||
def prepare_contacts(options)
|
||||
if options[:domain_name].present?
|
||||
contacts_by_domain(options[:domain_name])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue