pg-boss v1.1.0 Release Notes
-
- โ Added
onExpire(jobName, callback)
for guaranteed handling of expiration (not just an event anymore) - ๐ท
failed
was added as a job status - now emits 'failed' on unhandled subscriber errors instead of 'error', which is far safer
- ๐
done()
insuscribe()
callbacks now support passing an error (the popular node convention) to ๐ท automatically mark the job as failed as well as emitting failed. For example, ๐ท if you are processing a job and you want to explicitly mark it as failed, you can just calldone(error)
at any time. - ๐ท
fail(jobId)
added for external failure reporting along withfetch()
andcomplete()
- ๐ท
unsubscribe(jobName)
added to undo asubscribe()
- โ Added