Sha256: 08528992cecbec801ab02d4de391d71f3aaa9609388367c2e40346709fb3fb7b
Contents?: true
Size: 537 Bytes
Versions: 22
Compression:
Stored size: 537 Bytes
Contents
# frozen_string_literal: true Delayed::Worker.backend = :active_record if Object.const_defined?("Postmark") class InvalidRecipientsPlugin < Delayed::Plugin callbacks do |lifecycle| lifecycle.around(:invoke_job) do |job, *args, &block| # Forward the call to the next callback in the callback chain block.call(job, *args) rescue Postmark::InactiveRecipientError => e Rails.logger.error "#{e.class}: #{e.message}" end end end Delayed::Worker.plugins << InvalidRecipientsPlugin end
Version data entries
22 entries across 22 versions & 1 rubygems