refactoring

This commit is contained in:
Oleg Hasjanov 2021-04-15 14:48:03 +03:00
parent f0de396e82
commit 77b99b3d2e

View file

@ -3,8 +3,8 @@ class BouncedEmailsCleanerJob < ApplicationJob
def perform
BouncedMailAddress.find_each do |bounce|
count = Contact.where(email: bounce.email).count
bounce.destroy if count.zero?
count = Contact.where(email: bounce.email).count
bounce.destroy if count.zero?
end
end
end