Sha256: a2dc477f05c02950a9c97b2672c6847bf16d4facbdc1c669ff83eb66f7e6c3b0

Contents?: true

Size: 901 Bytes

Versions: 152

Compression:

Stored size: 901 Bytes

Contents

# frozen_string_literal: true

module ActionMailbox
  # You can configure when this +IncinerationJob+ will be run as a time-after-processing using the
  # +config.action_mailbox.incinerate_after+ or +ActionMailbox.incinerate_after+ setting.
  #
  # Since this incineration is set for the future, it'll automatically ignore any <tt>InboundEmail</tt>s
  # that have already been deleted and discard itself if so.
  #
  # You can disable incinerating processed emails by setting +config.action_mailbox.incinerate+ or
  # +ActionMailbox.incinerate+ to +false+.
  class IncinerationJob < ActiveJob::Base
    queue_as { ActionMailbox.queues[:incineration] }

    discard_on ActiveRecord::RecordNotFound

    def self.schedule(inbound_email)
      set(wait: ActionMailbox.incinerate_after).perform_later(inbound_email)
    end

    def perform(inbound_email)
      inbound_email.incinerate
    end
  end
end

Version data entries

152 entries across 147 versions & 12 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/actionmailbox-7.1.3.4/app/jobs/action_mailbox/incineration_job.rb
actionmailbox-8.0.1 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-8.0.0.1 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.2.2.1 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.1.5.1 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.0.8.7 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-8.0.0 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.2.2 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.1.5 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-8.0.0.rc2 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.2.1.2 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.1.4.2 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.0.8.6 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-6.1.7.10 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-8.0.0.rc1 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-6.1.7.9 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.2.1.1 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.1.4.1 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-7.0.8.5 app/jobs/action_mailbox/incineration_job.rb
actionmailbox-8.0.0.beta1 app/jobs/action_mailbox/incineration_job.rb