Menu

How Do You Build an Idempotent Job Ledger for Dialers and CRM Sync in SQLite?
📰

How Do You Build an Idempotent Job Ledger for Dialers and CRM Sync in SQLite?

DEV Community: rust·Muhammad Afzal Kalwar·about 7 hours ago
#i4vV39YA
#devtorust#devto#dev#job_key#conn
Long article (1204 words) — no AI summary yet.
Reading 0:00
15s threshold

Short answer

Give every unit of work a stable job key, write it to a SQLite ledger as pending before you side-effect the world, then mark it succeeded or failed only after you know the outcome. On restart, resume pending or failed jobs that are safe to retry, and never create a second dial, SMS, or CRM create for a key that already succeeded. Python can own the workers; Rust can own the ledger writes if you want a small, well-tested core. The ledger is what makes a crash boring instead of a double-send.

This complements “run unattended” and “upsert the CRM.” It is about the job itself, not about contact deduplication.

What goes wrong without a ledger

A dialer queue, a CRM push, or a campaign send usually looks like “read the next row and do the thing.” If the process dies after the call is placed but before you record the result, a naive restart places the call again.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.