Rustango docs

Jobs & the queue

Run work off-request with retry.

Implement the Job trait and enqueue it; a worker pool runs it with exponential-backoff retry and a dead-letter callback. The default queue is in-memory; jobs-postgres gives a durable, multi-worker DB queue (FOR UPDATE SKIP LOCKED).

queue.enqueue(SendWelcome { user_id }).await?;   // returns immediately
queue.run_workers(4).await;                       // in the worker binary