Class: Workarea::IndexPaymentTransactions

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::CallbacksWorker, Sidekiq::Worker
Defined in:
app/workers/workarea/index_payment_transactions.rb

Instance Method Summary collapse

Instance Method Details

#perform(order_id) ⇒ Object



16
17
18
19
20
21
22
# File 'app/workers/workarea/index_payment_transactions.rb', line 16

def perform(order_id)
  order = Order.find(order_id) rescue nil
  return unless order.present?

  search_model = Search::Admin::Order.new(order)
  search_model.save if search_model.should_be_indexed?
end