MishkaPay.Ash.Inbox.Process (Mishka Pay v0.0.1)

Copy Markdown View Source

Works one inbox event: fires mishka_pay:event:process with it before the action's transaction starts, since the listeners may call the provider, and marks it processed when every listener took it. Otherwise it keeps the reason in :last_error and the action fails, so its AshOban job tries again.

Each try is a span, [:mishka_pay, :inbox, :process, :start | :stop], with the event's :provider, :tenant, :type and :event_id; :stop adds the :outcome (:processed or :retry) and the measurement :lag, the milliseconds since the event was stored.