⚠️ Version 0.4.0 has a number of small breaking changes which we've decided to release all as part of a single version. More breaking changes in one release is inconvenient, but we've tried to coordinate them in hopes that any future breaking changes will be non-existent or very rare. All changes will get picked up by the Go compiler, and each one should be quite easy to fix. The changes don't apply to any of the most common core APIs, and likely many projects won't have to change any code.
- Breaking change: There are a number of small breaking changes in the job list API using
JobList
/JobListTx
:- Now support querying jobs by a list of Job Kinds and States. Also allows for filtering by specific timestamp values. Thank you Jos Kraaijeveld (@thatjos)! 🙏🏻 PR #236.
- Job listing now defaults to ordering by job ID (
JobListOrderByID
) instead of a job timestamp dependent on on requested job state. The previous ordering behavior is still available withNewJobListParams().OrderBy(JobListOrderByTime, SortOrderAsc)
. PR #307. - The function
JobListCursorFromJob
no longer needs a sort order parameter. Instead, sort order is determined based on the job list parameters that the cursor is subsequently used with. PR #307.
- Breaking change: Client
Insert
andInsertTx
functions now return aJobInsertResult
struct instead of aJobRow
. This allows the result to include metadata like the newUniqueSkippedAsDuplicate
property, so callers can tell whether an inserted job was skipped due to unique constraint. PR #292. - Breaking change: Client
InsertMany
andInsertManyTx
now return number of jobs inserted asint
instead ofint64
. This change was made to make the type in use a little more idiomatic. PR #293. - Breaking change:
river.JobState*
type aliases have been removed. All job state constants should be accessed throughrivertype.JobState*
instead. PR #300.
See also the 0.4.0 release blog post with code samples and rationale behind various changes.