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