Updated

app/jobs / email_petitioners_job.rb

A
32 lines of codes
4 methods
2.9 complexity/method
3 churn
11.41 complexity
0 duplications
class EmailPetitionersJob < ApplicationJob
  1. EmailPetitionersJob has no descriptive comment
include EmailAllPetitionSignatories self.email_delivery_job_class = DeliverPetitionEmailJob self.timestamp_name = 'petition_email' attr_reader :email # It's likely that the email got deleted so we just log the error and move on rescue_from ActiveJob::DeserializationError do |exception| log_exception(exception) end def perform(**args) @email = args[:email] super end private def mailer_arguments(signature) super.merge(email: email) end def log_exception(exception) logger.info(log_message(exception)) end def log_message(exception) "#{exception.class.name} while running #{self.class.name}" end end