Class: SolidusBacktracs::Api::SyncShipmentsJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- SolidusBacktracs::Api::SyncShipmentsJob
- Defined in:
- app/jobs/solidus_backtracs/api/sync_shipments_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(shipments) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/jobs/solidus_backtracs/api/sync_shipments_job.rb', line 8 def perform(shipments) shipments = select_shipments(shipments) return if shipments.empty? sync_shipments(shipments) rescue RateLimitedError => e self.class.set(wait: e.retry_in).perform_later rescue StandardError => e SolidusBacktracs.config.error_handler.call(e, {}) end |