12 lines
290 B
Ruby
12 lines
290 B
Ruby
module Comments
|
|
class SendEmailNotificationWorker
|
|
include Sidekiq::Job
|
|
|
|
sidekiq_options queue: :mailers
|
|
|
|
def perform(comment_id)
|
|
comment = Comment.find_by(id: comment_id)
|
|
NotifyMailer.with(comment: comment).new_reply_email.deliver_now if comment
|
|
end
|
|
end
|
|
end
|