Sha256: d0769fcf70580f403d50a2c41ee727a08c55344e3f00f766ab9ec1433fb38920
Contents?: true
Size: 734 Bytes
Versions: 6
Compression:
Stored size: 734 Bytes
Contents
# frozen_string_literal: true module SolidusFriendlyPromotions class PromotionCodeBatchJob < ApplicationJob queue_as :default def perform(promotion_code_batch) PromotionCode::BatchBuilder.new( promotion_code_batch ).build_promotion_codes if promotion_code_batch.email? SolidusFriendlyPromotions.config.promotion_code_batch_mailer_class .promotion_code_batch_finished(promotion_code_batch) .deliver_now end rescue => e if promotion_code_batch.email? SolidusFriendlyPromotions.config.promotion_code_batch_mailer_class .promotion_code_batch_errored(promotion_code_batch) .deliver_now end raise e end end end
Version data entries
6 entries across 6 versions & 1 rubygems