Repository navigation
Schema version: 46, unchanged from 12.38.0
-
Fix: a job waiting for its retry could be deleted before the retry ran.
retentionSecondscounts from the time a job may start. A failure with retries left moved that time forward to the retry but kept the time the job was due to be deleted. A retry due after the job's first retention window ended was deleted by the next maintenance pass, with no event and no dead letter copy. A failure now moves the deletion time forward by the same amount.retry()andresume()move a job's start time up to now, and they now move its deletion time with it. A job retried or resumed after its first window ended is kept. Thanks to @calpeyser for the fix in #994. -
Fix: in a session time zone with daylight saving time, a job whose start time moved across a DST change got a deletion time an hour off. That happened on a retry,
retry(),resume()and anupdate()that changesstartAfter. The deletion time is now exactly the job's retention window after its new start time. Sessions in UTC, or in any zone without DST, were not affected. -
Fix: if registering the instance failed at
start(), for example on a full connection pool, every later heartbeat failed withnull value in column "started_on" of relation "instance" violates not-null constraint. The errors repeated everyinstanceHeartbeatSecondsuntil the instance stopped. A heartbeat now registers the instance again while no registration has succeeded, and that registration also counts crash restarts. Thanks to @simon-mx for the report and reproduction in #1004. -
Fix:
publish()with{ db }looked up the subscribed queues on pg-boss's own pool instead of thedbpassed in. Inside a transaction, the lookup took a second pool connection while the transaction held its own. Afterstop(),publish()rejected even with a validdb. The lookup now runs on thedbpassed in, like thesend()calls that follow it. Thanks to @Kalos-S for the fix in #1001. -
Fix: the published
CommandResponsetype has had no fields since 12.0.0, because the build stripped all four. Code that readsaffectedfromcomplete(), as the docs show, failed to compile. The declarations now includejobs,requested,affectedandsettled. Thanks to @Kalos-S for the fix in #998. -
Fix:
fail()typeddataasobject | null. Understrict, the error acatchblock receives isunknown, and passing it tofail()failed to compile.datanow acceptsunknown. Thanks to @Kalos-S for the fix in #1000.
PRs
- fix(pubsub): publish() looks up subscriptions on the db passed in options by @Kalos-S in #1001
- fix(types): publish CommandResponse fields in the emitted declarations by @Kalos-S in #998
- fix(types): fail() accepts a caught error of any type as data by @Kalos-S in #1000
- fix(retry): a job waiting for its retry is not deleted by retention by @calpeyser in #994
Full Changelog: 12.38.1...12.38.2