The queue namespace decides where review jobs wait, how many run at once,
how fast they can call each provider, and what happens when a job keeps
failing. The default is an in-memory queue; for production you should switch
to the durable SQLite queue so jobs survive restarts.
The SQLite queue is built on better-sqlite3
and is safe for either a single process or multiple processes sharing the same
file. Its key properties:
Atomic claim via UPDATE ... RETURNING. A worker claims the next queued
job and marks it running in a single statement, so two workers can never
grab the same job.
Stale-job reclaim after the lock TTL. A background sweep requeues any
running job whose lock is older than lock_ttl_seconds, so a crashed
worker’s job is eventually retried by another worker.
WAL + busy_timeout for cross-process safety. The queue opens with
PRAGMA journal_mode = WAL and PRAGMA busy_timeout = 5000, so concurrent
writers from different processes cooperate instead of erroring.
The canonical retry fields are attempts and backoff. The legacy
max_attempts / backoff_seconds pair is still accepted and normalized, but
deprecated — migrate to attempts + backoff.
Field
Type
Default
Description
attempts
int > 0
–
Total attempts including the first try. 1 = no retry.
backoff.kind
enum
–
exponential, linear, or constant.
backoff.base_ms
number > 0
–
First/backoff base delay in ms.
backoff.max_ms
number > 0
–
Cap on a single backoff delay.
backoff.jitter
bool
–
Add random jitter.
queue:
retry:
attempts: 2# retry once on transient failures (1 = no retry)