Class: Edi::Menard::InventoryMessageSender

Inherits:
BaseEdiService show all
Defined in:
app/services/edi/menard/inventory_message_sender.rb

Overview

Service object: inventory message sender.

Constant Summary collapse

SEND_TIMEOUT_SECONDS =

A hung PingOne login blocked send_file indefinitely from 2026-07-13 to
2026-08-03 (no Playwright timeout ever fired), wedging the ready queue
for three weeks. Successful uploads take ~10s.

300

Constants included from RequestIdentifiable

RequestIdentifiable::REQUEST_ID_HEADERS

Constants included from AddressAbbreviator

AddressAbbreviator::MAX_LENGTH

Instance Attribute Summary

Attributes inherited from BaseEdiService

#orchestrator

Attributes inherited from BaseService

#options

Instance Method Summary collapse

Methods inherited from BaseEdiService

#amazon_feed_product_type, #duplicate_po_already_notified?, #initialize, #mark_duplicate_po_as_notified, #onboard_ordered_catalog_items, #report_order_creation_issues, #safe_process_edi_communication_log

Methods included from RequestIdentifiable

#partner_request_id

Methods included from AddressAbbreviator

#abbreviate_street, #collect_street_originals, #record_address_abbreviation_notes

Methods inherited from BaseService

#initialize, #log_debug, #log_error, #log_info, #log_warning, #logger, #tagged_logger

Constructor Details

This class inherits a constructor from Edi::BaseEdiService

Instance Method Details

#process(edi_communication_logs = nil) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'app/services/edi/menard/inventory_message_sender.rb', line 13

def process(edi_communication_logs = nil)
  ecls = edi_communication_logs ? [edi_communication_logs].flatten : supersede_stale(ecl_in_queue.to_a)
  return ecls if ecls.empty?

  transport = instantiate_transporter
  ecls.each do |ecl|
    send_ecl(ecl, transport)
  end
  ecls
end