Class: ActionMailbox::IncinerationJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- ActionMailbox::IncinerationJob
- Defined in:
- actionmailbox/app/jobs/action_mailbox/incineration_job.rb
Overview
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 InboundEmail
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
.
Constant Summary
Constants included from ActiveSupport::Callbacks
ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES
Instance Attribute Summary
Attributes included from ActiveJob::Core
#arguments, #enqueue_error, #enqueued_at, #exception_executions, #executions, #job_id, #locale, #priority, #provider_job_id, #queue_name, #scheduled_at, #serialized_arguments, #successfully_enqueued, #timezone
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ActiveSupport::Concern
#append_features, #class_methods, extended, #included, #prepend_features, #prepended
Methods included from ActiveJob::Logging
Methods included from ActiveJob::Instrumentation
Methods included from ActiveJob::Exceptions
Methods included from ActiveSupport::Callbacks
Methods included from ActiveJob::QueuePriority
Methods included from ActiveJob::QueueName
Methods included from ActiveJob::Core
#deserialize, #initialize, #serialize, #set, #successfully_enqueued?
Class Method Details
.schedule(inbound_email) ⇒ Object
17 18 19 |
# File 'actionmailbox/app/jobs/action_mailbox/incineration_job.rb', line 17 def self.schedule(inbound_email) set(wait: ActionMailbox.incinerate_after).perform_later(inbound_email) end |
Instance Method Details
#perform(inbound_email) ⇒ Object
21 22 23 |
# File 'actionmailbox/app/jobs/action_mailbox/incineration_job.rb', line 21 def perform(inbound_email) inbound_email.incinerate end |