Class: Events::DeliveryReadyForLabeling
- Inherits:
-
ApplicationEvent
- Object
- RubyEventStore::Event
- ApplicationEvent
- Events::DeliveryReadyForLabeling
- Defined in:
- app/events/events.rb
Overview
Domain event emitted when a Delivery transitions from picking into
pending_ship_labels with non-shipping line items and isn't a warehouse
pickup. Replaces the synchronous set_packaged_items_md5_hash call in
the after_transition block so the warehouse UI no longer waits on
DeliveryMd5Extractor (Packing.upsert + HABTM item_ids writes) before
returning control to the controller. The async handler re-queries by id
and re-checks the gating predicates so a queue-retry remains safe.
Payload: data: { delivery_id: Integer }