Settle each backlog payload as it is processed

FixSecurityService
Shipped
August 20, 2026 at 11:19 PM UTC
Author
Kamo
Commit
a0e1274

processBacklog mirrored the scheduled job's two defects: it mutated payload statuses in memory and saved them in one batch at the end, and it saved the whole endpoint entity to bump a counter. createLead commits per lead, so an outcome that does not stick leaves a committed lead whose payload is still RECEIVED — and the every-minute job then imports it a second time, because this path has no vendorLeadID dedup. Saving the entity also drags the Organization graph into the write transaction, which YugabyteDB rejects with a read restart, and rewriting the endpoint row wrote back every field as it was when the batch started. Now markPayloadOutcome per row and recordProcessed for the counter, matching LeadIntakeProcessingJob.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing