aboutsummaryrefslogblamecommitdiffstats
path: root/actionmailbox/app/jobs/action_mailbox/routing_job.rb
blob: fc3388daff14ea7f1ecd515ed9b4f201930c229e (plain) (tree)
1
2
3
4
5
6
7
8
9

                             

                                                                                                          
                                                 
                                             

                            
                       

     
# frozen_string_literal: true

# Routing a new InboundEmail is an asynchronous operation, which allows the ingress controllers to quickly
# accept new incoming emails without being burdened to hang while they're actually being processed.
class ActionMailbox::RoutingJob < ActiveJob::Base
  queue_as { ActionMailbox.queues[:routing] }

  def perform(inbound_email)
    inbound_email.route
  end
end