main: run the sweep one at a time, batch the settled lookup #122

Stängd
öppnade 2026-10-08 21:12:30 +00:00 av supernaut · 0 kommentarer
Ägare

What

The 10-minute timer in src/main.ts can overlap itself. reconcile runs one query per Mollie payment.

Why

Locks and refund keys keep overlap safe, but Mollie calls double.

Failing case

Sweep plus reconcile takes more than 10 minutes (for example Mollie 429, see #86). The next tick starts while the first runs.

Fix

A running flag around the tick. One inArray query for the settled refs instead of settled() per payment.

Done when

  • A tick while one runs is skipped, with a test.
  • reconcile does one lookup query per pass.
## What The 10-minute timer in `src/main.ts` can overlap itself. `reconcile` runs one query per Mollie payment. ## Why Locks and refund keys keep overlap safe, but Mollie calls double. ## Failing case Sweep plus reconcile takes more than 10 minutes (for example Mollie 429, see #86). The next tick starts while the first runs. ## Fix A `running` flag around the tick. One `inArray` query for the settled refs instead of `settled()` per payment. ## Done when - [ ] A tick while one runs is skipped, with a test. - [ ] `reconcile` does one lookup query per pass.
supernaut lade till detta till projektet Bitborg Payment 2026-10-08 21:14:15 +00:00
supernaut refererade till detta ärende från en incheckning 2026-10-18 12:39:03 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-payment#122
Ingen beskrivning angiven.