936 B
936 B
| id | date | status | supersedes | superseded-by | affected-paths | affected-components | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| 0004 | 2026-02-18 | Accepted |
|
|
0004 — Persist job queue to SQLite; survive process restarts
Context
In-memory queue loses all pending jobs on restart. Clients resubmit, causing duplicates and lost work.
Decision
All enqueued jobs persisted to local SQLite database (taskq.db). On startup, reload pending jobs from disk. Transaction isolation ensures no jobs are lost mid-processing.
Consequences
Jobs survive restarts. Startup slower (disk IO). Must coordinate restart with in-flight execution to avoid double-processing. Query performance on large queues depends on SQLite optimization.
Alternatives rejected
In-memory with RDB snapshots rejected: complexity without durability guarantee. Remote store (PostgreSQL) rejected: too heavyweight for single-user queue.