Class: EdiProductDataFlowFinalizer
- Inherits:
-
Object
- Object
- EdiProductDataFlowFinalizer
- Defined in:
- app/workers/edi_product_data_flow_finalizer.rb
Overview
Sidekiq Pro batch callback for the actual partner jobs. The scheduled
dispatcher check-in proves the cron fired; this callback records when the
complete product-data flow finished and whether any partner exhausted retries.
Instance Method Summary collapse
-
#on_complete(status, options) ⇒ void
Reports the outcome of the completed partner batch.
Instance Method Details
#on_complete(status, options) ⇒ void
This method returns an undefined value.
Reports the outcome of the completed partner batch.
14 15 16 17 18 19 20 21 |
# File 'app/workers/edi_product_data_flow_finalizer.rb', line 14 def on_complete(status, ) duration = Time.current - Time.iso8601(.fetch('started_at')) failures = status.failures.to_i target_count = .fetch('target_count').to_i ErrorReporting.error("EDI product-data batch #{status.bid}: #{failures} partner job(s) failed") if failures.positive? report_completion(status:, target_count:, failures:, duration:) end |