mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
13 lines
335 B
Ruby
13 lines
335 B
Ruby
class ActionMailbox::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
|