Class: AmazonOrderStatusVerificationWorker
- Inherits:
-
Object
- Object
- AmazonOrderStatusVerificationWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/amazon_order_status_verification_worker.rb
Overview
Scheduled daily at 6 PM Central to verify that recently-invoiced Amazon
orders have reached the expected "Shipped" status on Amazon Seller Central.
Iterates all Amazon Seller Central partners that have
order_status_verification_enabled: true in their orchestrator config
(currently US and CA).
See: Edi::Amazon::OrderStatusVerifier for the verification logic.
See: config/sidekiq_production_schedule.yml for the schedule entry.
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/workers/amazon_order_status_verification_worker.rb', line 17 def perform Edi::Amazon::Orchestrator.orchestrators.each do |orchestrator| next unless orchestrator.active && orchestrator.order_status_verification_enabled? Rails.logger.tagged("OrderStatusVerification", orchestrator.partner) do orchestrator.execute_order_status_verification end rescue StandardError => e ErrorReporting.error(e, "OrderStatusVerification failed for #{orchestrator.partner}") end end |