2020-05-05 18:40:56 +00:00
|
|
|
class Notification::EmailNotificationJob < ApplicationJob
|
|
|
|
queue_as :default
|
|
|
|
|
|
|
|
def perform(notification)
|
2020-09-10 13:49:15 +00:00
|
|
|
# no need to send email if notification has been read already
|
|
|
|
return if notification.read_at.present?
|
|
|
|
|
2020-05-05 18:40:56 +00:00
|
|
|
Notification::EmailNotificationService.new(notification: notification).perform
|
|
|
|
end
|
|
|
|
end
|