Module: Workers::LabelPrinting

Included in:
GetFreightquoteLoadNumber, SpeedeeLabelWorker
Defined in:
app/concerns/workers/label_printing.rb

Overview

Lets an asynchronous label worker pipe the finished documents to the
operator's chosen print profile itself, rather than leaving it to the
landing page the job redirects to.

Both async flows (SpeedeeLabelWorker, GetFreightquoteLoadNumber) used to
print only from that landing page, which loads only if the operator is
still on the job page when the job finishes. On 2026-07-31 Sidekiq worker
starvation held the high queue at ~11.6 minutes of latency; by the time
the Spee-Dee jobs ran the warehouse had moved on, so SO729194 / SO729214
rendered their labels correctly and printed nothing. Printing here means a
queued job costs a delay, not a lost label.

The no-profile case ("Download Label PDF") is deliberately NOT handled here
— a browser download needs a live request, and an operator who chose it is
by definition waiting on the page.