Class: Spree::ShippingLabels::StoreFileJob
- Defined in:
- app/jobs/spree/shipping_labels/store_file_job.rb
Overview
Retries fetching a purchased label's file when the fetch right after purchase failed — the carrier's hosted copy is usually there a moment later. Idempotent: an already-attached file is left alone.
Constant Summary
Constants inherited from BaseJob
Instance Method Summary collapse
Instance Method Details
#perform(shipping_label_id) ⇒ Object
10 11 12 13 14 |
# File 'app/jobs/spree/shipping_labels/store_file_job.rb', line 10 def perform(shipping_label_id) shipping_label = Spree::ShippingLabel.find(shipping_label_id) result = Spree.shipping_label_store_file_service.call(shipping_label: shipping_label) raise result.error.to_s if result.failure? end |