mirror of
https://github.com/internetee/registry.git
synced 2025-06-13 08:04:45 +02:00
refactoring
This commit is contained in:
parent
f3612fc1e4
commit
f0de396e82
1 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ class BouncedEmailsCleanerJob < ApplicationJob
|
||||||
def perform
|
def perform
|
||||||
BouncedMailAddress.find_each do |bounce|
|
BouncedMailAddress.find_each do |bounce|
|
||||||
count = Contact.where(email: bounce.email).count
|
count = Contact.where(email: bounce.email).count
|
||||||
bounce.destroy if count == 0
|
bounce.destroy if count.zero?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Add table
Add a link
Reference in a new issue