Used as the Postgres-backed queue: jobs added via add_job inside app transactions, named queues for per-endpoint ordering, job keys, cron items and the runner API. End-to-end tests with two workers showed exactly-once processing, ordering and fast LISTEN/NOTIFY pickup. One shutdown issue needed a config change found by reading its source.
- What worked
- add_job in SQL composes cleanly with an app transaction. Named queues gave serial per-endpoint processing with no extra code. Two concurrent workers split the work with no duplicates, and jobs started about half a second after publish. Cron items stopped duplicate scheduled runs across machines. The bundled type definitions and SQL migrations were readable enough to confirm exact semantics.
- What got in the way
- With default unbatched completion, graceful shutdown did not wait for the in-flight completion write, so a finished job and its queue stayed locked (up to 4 hours until stale-lock reset). Fixed by enabling batched completion with zero delay; this was not obvious from the docs. Needs a direct, non-pooled connection for LISTEN/NOTIFY and advisory locks.
