mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-17 04:34:24 +00:00
Merge pull request #7694 from coopdevs/split-confirm-order-job
Split ConfirmOrderJob to avoid blocking DJ worker
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ConfirmOrderJob < ActiveJob::Base
|
||||
def perform(order_id)
|
||||
Spree::OrderMailer.confirm_email_for_customer(order_id).deliver_now
|
||||
Spree::OrderMailer.confirm_email_for_shop(order_id).deliver_now
|
||||
end
|
||||
end
|
||||
@@ -343,7 +343,8 @@ module Spree
|
||||
def deliver_order_confirmation_email
|
||||
return if subscription.present?
|
||||
|
||||
ConfirmOrderJob.perform_later(id)
|
||||
Spree::OrderMailer.confirm_email_for_customer(id).deliver_later
|
||||
Spree::OrderMailer.confirm_email_for_shop(id).deliver_later
|
||||
end
|
||||
|
||||
# Helper methods for checkout steps
|
||||
|
||||
Reference in New Issue
Block a user