Skip to content

Releases: riverqueue/riverqueue-ruby

v0.8.0

20 Dec 05:37
6c93eed
Compare
Choose a tag to compare

⚠️ Version 0.8.0 contains breaking changes to transition to River's new unique jobs implementation and to enable broader, more flexible application of unique jobs. Detailed notes on the implementation are contained in the original River PR, and the notes below include short summaries of the ways this impacts this client specifically.

Users should upgrade backends to River v0.12.0 before upgrading this library in order to ensure a seamless transition of all in-flight jobs. Afterward, the latest River version may be used.

Breaking

  • Breaking change: The return type of Client#insert_many has been changed. Rather than returning just the number of rows inserted, it returns an array of all the InsertResult values for each inserted row. Unique conflicts which are skipped as duplicates are indicated in the same fashion as single inserts (the unique_skipped_as_duplicated attribute), and in such cases the conflicting row will be returned instead. PR #32.
  • Breaking change: Unique jobs no longer allow total customization of their states when using the by_state option. The pending, scheduled, available, and running states are required whenever customizing this list. PR #32.

Added

  • The UniqueOpts class gains an exclude_kind option for cases where uniqueness needs to be guaranteed across multiple job types. PR #32.

  • Unique jobs utilizing by_args can now also opt to have a subset of the job's arguments considered for uniqueness. For example, you could choose to consider only the customer_id field while ignoring the other fields:

    UniqueOpts.new(by_args: ["customer_id"])

    Any fields considered in uniqueness are also sorted alphabetically in order to guarantee a consistent result across implementations, even if the encoded JSON isn't sorted consistently. PR #32.

Changed

  • Unique jobs have been improved to allow bulk insertion of unique jobs via Client#insert_many.

    This updated implementation is significantly faster due to the removal of advisory locks in favor of an index-backed uniqueness system, while allowing some flexibility in which job states are considered. However, not all states may be removed from consideration when using the by_state option; pending, scheduled, available, and running states are required whenever customizing this list. PR #32.

  • Update REXML dependency. PR #28.

v0.7.0

31 Aug 04:50
5097d21
Compare
Choose a tag to compare

Changed

v0.6.1

21 Aug 14:57
29b8e4f
Compare
Choose a tag to compare

Fixed

  • Fix source files not being correctly included in built Ruby gems. PR #26.

v0.6.0

07 Jul 03:48
f66d153
Compare
Choose a tag to compare

Changed

  • Advisory lock prefixes are now checked to make sure they fit inside of four bytes. PR #24.

v0.5.0

06 Jul 19:46
94aca9b
Compare
Choose a tag to compare

Changed

  • Tag format is now checked on insert. Tags should be no more than 255 characters and match the regex /\A[\w][\w\-]+[\w]\z/. PR #22.
  • Returned jobs now have a metadata property. PR #21.

v0.4.0

29 Apr 06:05
3cecc5c
Compare
Choose a tag to compare

Changed

  • Implement the FNV (Fowler–Noll–Vo) hashing algorithm in the project and drop dependency on the fnv-hash gem. PR #14.

v0.3.0

28 Apr 03:43
9b6d241
Compare
Choose a tag to compare

Added

  • Implement unique job insertion. PR #10.

v0.2.0

27 Apr 18:30
668fc43
Compare
Choose a tag to compare

Added

  • Implement #insert_many for batch job insertion. PR #5.

v0.1.0

26 Apr 03:32
06c9bea
Compare
Choose a tag to compare

Added

  • Initial implementation that supports inserting jobs using either ActiveRecord or Sequel. PR #1.