github riverqueue/river v0.4.0

latest releases: v0.12.1, cmd/river/v0.12.1, rivertype/v0.12.1...
5 months ago

⚠️ 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 with NewJobListParams().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 and InsertTx functions now return a JobInsertResult struct instead of a JobRow. This allows the result to include metadata like the new UniqueSkippedAsDuplicate property, so callers can tell whether an inserted job was skipped due to unique constraint. PR #292.
  • Breaking change: Client InsertMany and InsertManyTx now return number of jobs inserted as int instead of int64. 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 through rivertype.JobState* instead. PR #300.

See also the 0.4.0 release blog post with code samples and rationale behind various changes.

Don't miss a new river release

NewReleases is sending notifications on new releases.