Repository navigation
12.35.1
Schema version: 43, unchanged from 12.35.0
-
Fix: with the Bun SQL adapter (
fromBunSql), five statements bound a JSON payload that Bun encoded a second time. Postgres then received a JSON string instead of an object. Two of them failed silently:findJobs()with adatafilter returned no jobs.redrive()andpreviewRedrive()with adatafilter matched nothing, so they moved and counted nothing.
The other three:
- A schedule's
lastJobIdstayednull, and each cron pass that sent a job emitted a warning. - A schedule whose stored kind disagreed with its expression was not relabelled.
- With
persistWarningson, a persisted warning'sdatawas stored as a JSON string, not an object.
Each statement now routes its payload through text, as #897 did for the ones that existed then. node-postgres and PGlite are unaffected.
-
Fix: on CockroachDB, a job whose data is an array could not fail. Failing it threw
invalid input syntax for type jsonand left itactive, whether it failed throughfail(), a handler error, a per-job batch result, expiry or a missed heartbeat. Maintenance then hit the same error on every pass. Jobs with object data were not affected. -
Fix:
stop()no longer takes at least 500 ms when a worker has done any work. It now waits on the worker cleanups themselves, within the same deadline, instead of polling for them every 500 ms.Thanks to @bhamiltoncx for #935.
-
Fix: the
JobAttempttype is now exported, for code that passes{ id, retryCount }to the settle methods. -
deleteAllJobs()now zeroes the cached queue counts when it truncates. With no name, and for a partitioned queue, it empties the table withTRUNCATE, and the counts thatgetQueue()returns now drop to zero at the same time instead of keeping the deleted jobs until the next monitor pass.Every other delete still leaves the counts to the next monitor pass. That covers
deleteQueuedJobs(),deleteStoredJobs(), anddeleteAllJobs(name)on a queue in the shared table. Recounting after a partial delete would mean an unbounded read of the job table, racing the monitor.
New Contributors
Full Changelog: 12.35.0...12.35.1