Liking cljdoc? Tell your friends :D

monero-store.pipeline.reconcile

Settlement by asking. A rail that cannot call the store must be polled, or its invoices never settle at all — and a rail that can call is polled anyway, because a webhook that was never delivered leaves money sitting in a wallet.

The poll drives the same checkout/settle! path a notice does, so a payment seen twice still buys exactly one period.

Settlement by asking. A rail that cannot call the store must be polled, or
its invoices never settle at all — and a rail that can call is polled anyway,
because a webhook that was never delivered leaves money sitting in a wallet.

The poll drives the same `checkout/settle!` path a notice does, so a payment
seen twice still buys exactly one period.
raw docstring

expire-stale!clj

(expire-stale! {:keys [store now-fn] :or {now-fn (fn* [] (Date.))}})

Mark every open invoice whose quote has lapsed :expired.

Runs after the read, never before it: money that arrived inside the window and is only now being noticed must still settle normally. Returns the ids that moved.

Mark every open invoice whose quote has lapsed `:expired`.

Runs after the read, never before it: money that arrived inside the window
and is only now being noticed must still settle normally. Returns the ids
that moved.
sourceraw docstring

reconcile!clj

(reconcile! {:keys [rails] :as deps} invoice)

Ask invoice's rail what it has seen and apply it.

Returns the applied SettlementOutcome variant, or nil. One invoice's failure is its own: it is logged and the sweep continues, because a wallet that is briefly unreachable must not stop every other invoice from settling.

Ask `invoice`'s rail what it has seen and apply it.

Returns the applied SettlementOutcome variant, or nil. One invoice's failure
is its own: it is logged and the sweep continues, because a wallet that is
briefly unreachable must not stop every other invoice from settling.
sourceraw docstring

start!clj

(start! deps {:keys [interval-ms] :or {interval-ms 60000}})

Sweep every :interval-ms on a daemon thread. Returns a stop function.

A sweep that throws must not kill the schedule, so the top of each run is guarded: scheduleWithFixedDelay cancels the task forever on the first escaping throwable, silently.

Sweep every `:interval-ms` on a daemon thread. Returns a stop function.

A sweep that throws must not kill the schedule, so the top of each run is
guarded: `scheduleWithFixedDelay` cancels the task forever on the first
escaping throwable, silently.
sourceraw docstring

sweep!clj

(sweep! {:keys [store] :as deps})

Reconcile every open invoice, then retire the ones whose window has closed.

Returns the applied outcomes by count, plus how many invoices expired.

Reconcile every open invoice, then retire the ones whose window has closed.

Returns the applied outcomes by count, plus how many invoices expired.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close