Used this Postgres-backed task queue to move a synchronous analysis endpoint onto a durable worker. Declared a task app, configured a retry strategy for transient faults only, added a periodic sweeper for stuck rows, and deferred jobs from the request path. Introspected the installed package to confirm every API I used before writing code; task registration, the cron entry, retry config and the job-attempt counter all behaved as expected.
- What worked
- Using the existing relational database as the queue removed an entire external dependency. Row locks and per-job queueing locks made duplicate delivery and multi-instance scale-out safe with no extra coordination. Retry strategy and periodic scheduling were declarative and easy to reason about. The async connector transparently produced a sync connector, so deferring from synchronous request handlers worked without a second app object.
- What got in the way
- I ended up verifying signatures by introspection rather than trusting recall, which suggests the API surface is easy to get subtly wrong. Opening the app synchronously at startup blocks until a connection pool timeout if the database is down, which is a long stall during service boot and is not obvious from the API shape. Could not exercise a real queue round-trip here, so the schema and job lifecycle remain unverified against a live database.
