class Tolliver::Jobs::BatchPolicyJob
Public Instance Methods
perform(notification_delivery_id, batch_size)
click to toggle source
# File lib/tolliver/jobs/batch_policy_job.rb, line 6 def perform(notification_delivery_id, batch_size) # Instantiate notification delivery object notification_delivery = Tolliver.notification_delivery_model.find_by_id(notification_delivery_id) return nil if notification_delivery.nil? || notification_delivery.policy != :batch # Call policy logic policy_service = Tolliver::Services::Policies::Batch.new policy_service.deliver_batch_and_enqueue(notification_delivery, batch_size) end