mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 20:19:34 +02:00
108868838-logic_update
This commit is contained in:
parent
58e35d5683
commit
3169d6c325
2 changed files with 2 additions and 4 deletions
|
@ -176,11 +176,9 @@ class DomainMailer < ApplicationMailer
|
|||
name: @domain.name)} [#{@domain.name}]")
|
||||
end
|
||||
|
||||
def expiration_reminder(domain_id, should_deliver)
|
||||
def expiration_reminder(domain_id)
|
||||
@domain = Domain.find_by(id: domain_id)
|
||||
return unless @domain
|
||||
return if delivery_off?(@domain, should_deliver)
|
||||
|
||||
return if whitelist_blocked?(@domain.registrant.email)
|
||||
mail(to: format(@domain.registrant.email),
|
||||
subject: "#{I18n.t(:expiration_remind_subject,
|
||||
|
|
|
@ -263,7 +263,7 @@ class Domain < ActiveRecord::Base
|
|||
domains.each do |domain|
|
||||
next unless domain.expirable?
|
||||
domain.set_graceful_expired
|
||||
DomainMailer.expiration_reminder(domain.id, deliver_emails).deliver
|
||||
DomainMailer.expiration_reminder(domain.id).deliver
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue