KamoCRM

Settle each backlog payload as it is processed

FixSecurityService
Shipped
20 ஆகஸ்ட், 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing