AshDispatch.Workers.SendSMS (AshDispatch v0.8.3)

View Source

Sends one SMS receipt through the configured backend.

Mirrors AshDispatch.Workers.SendEmail, for the same reason: dispatch runs in an after_action hook inside the action's transaction, and an outbound HTTPS round trip per recipient does not belong there. The transport enqueues, the worker sends.

Before 0.8.2 the SMS transport called the backend directly. A slow or unreachable provider held the action's transaction open, time: scheduling could not be used, and a failed send could never be retried — RetryFailedDeliveries only recognises transports that have a worker.

Job arguments

  • receipt_id — the receipt's UUID. Everything else is read from the receipt, so a retry can never send different text than the one frozen at creation.