Added
- Added
JobDeleteManyParams.Where, an escape hatch for deleting jobs by an arbitrary SQL predicate, likeJobListParams.Wheredoes for lists. For example, it can select queued jobs whose args name a given customer. AWherepredicate counts as a filter, so it doesn't needUnsafeAll, and each predicate is wrapped in parentheses so that anORin it can't widen the deletion past other filters or to running jobs. The existing batch limit (100 jobs by default) and Postgres behavior of skipping locked jobs still apply. PR #1570.
Fixed
- Fixed a running job not being cancelled after
Client.JobCancelwhen the cancellation notification was lost, as happens if it's sent while the client's notifier is reconnecting. Clients with a notifier now also check their running jobs for cancellation requests once a minute.Client.JobRetrynow clears an earlier attempt's cancellation request so that the retried job isn't cancelled again. PR #1564. - Fixed
Client.InsertManyFastpanicking after its transaction committed on a client configured with queues when the driver doesn't support a listener, such as ariverdatabasesqldriver created withNewinstead ofNewWithPgxListener. It now wakes producers for the inserted jobs' queues right away, likeClient.InsertMany. PR #1558. - Fixed
Client.QueueUpdatewithout metadata crashing the program when the client works that queue and the driver doesn't support a listener. PR #1558. - Fixed the notifier's run loop blocking forever when a topic
LISTENorUNLISTENhanded to it finished after its caller had stopped waiting (after 5 seconds, withtimed out waiting for interrupt operation), as can happen on a slow or unresponsive connection.Client.Stopthen never completed, and neither did aClient.Startthat failed this way. PR #1559.