solid_queue-coalesce 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f395a95881f8639b6abcee94b8e161395cf3026618f63c92ca9612540b30bf0
4
- data.tar.gz: e5d16c7e02d2a5ae34d18826dfe5dabc42f8ccfcb1802a247fad8eebdd56926e
3
+ metadata.gz: 9832b3432d9f235ba2e8b752017633b5bd974f26277ed30eae8e72651a942cf7
4
+ data.tar.gz: 4b74f5be0748dbd2e47d8489fb984b836de4de0d0621710b559e12f7bd98290e
5
5
  SHA512:
6
- metadata.gz: 6acaf7eca6a5915de50cbe9aca92b7c042635de9f32a44e0642927a957bdc2855a691c42d883758bceb8ef4cd6250525b9d3ac633b39b7150c2ecd1a207ac1d7
7
- data.tar.gz: 11ec3d1ef332b093e1338c6e0dc24ad7ce2ea250c6cc0951981ee637f64908d586885d9dd244034d3abc5842426e6f57bcd30ca479063b4204e261b3065157ad
6
+ metadata.gz: 568cd5b18e36ac02fae073249b54e98546bdca672ecd08bb6db130eb936b5ae47da721e5123067fdee7d6240ef12ae082780c63aeeadab2ea835afe3407cbe7a
7
+ data.tar.gz: 0c160c406c984cae3e303c9dcef834f21ae95658fd1456fccb5a57be5c42dcd1d7aae650e1d7ad60c3a402d565c8b7cab8851d674324402bc4c28fff2390f20a
data/CHANGELOG.md ADDED
@@ -0,0 +1,64 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.0] - 2026-11-02
10
+
11
+ Adds debouncing with `debounce:` and `max_wait:`, batches that run as soon as they fill with `on_full: :dispatch`, and support for [`SolidQueue::Batch`](https://github.com/rails/solid_queue/blob/v1.7.0/README.md#batch-jobs). Collecting jobs now use `perform_calls(calls)`, so upgrading from 0.1.0 needs code changes, a drain and a migration. See [UPGRADING.md](https://github.com/dtcristo/solid_queue-coalesce/blob/main/UPGRADING.md).
12
+
13
+ ### Added
14
+
15
+ - Coalesced jobs can be part of a `SolidQueue::Batch`. Calls with the same key share one job within a batch, and that job belongs to that batch alone. ([#35](https://github.com/dtcristo/solid_queue-coalesce/pull/35))
16
+ - `on_full: :dispatch` for `coalesce`, which dispatches a delayed collecting job as soon as it fills. ([#21](https://github.com/dtcristo/solid_queue-coalesce/pull/21))
17
+ - `debounce:` and `max_wait:` for `coalesce`. Each call pushes a pending job back by the window, and `max_wait` caps how far. A recurring task can't use a debounced class. ([#28](https://github.com/dtcristo/solid_queue-coalesce/pull/28))
18
+ - `class_name` in the `coalesce.solid_queue` and `drop_coalesced_call.solid_queue` payloads. ([#19](https://github.com/dtcristo/solid_queue-coalesce/pull/19))
19
+ - `ActiveJob::Coalescing::CollectedJobMismatch`. A collecting job whose configuration changed fails with its calls, and you can recover by restoring the declaration and retrying it. ([#15](https://github.com/dtcristo/solid_queue-coalesce/pull/15))
20
+
21
+ ### Changed
22
+
23
+ - **Breaking:** Calls skipped because their records are gone stay until their job is destroyed and are reconsidered on each attempt. Skip notifications can repeat on retries, and restored records can run on a later attempt. ([#30](https://github.com/dtcristo/solid_queue-coalesce/pull/30))
24
+ - **Breaking:** `coalesce` takes `on_conflict: :discard` or `:collect`, and `max_calls:`. These replace `collect:`, `limit:` and `flush_when_full:`. ([#3](https://github.com/dtcristo/solid_queue-coalesce/pull/3), [#27](https://github.com/dtcristo/solid_queue-coalesce/pull/27))
25
+ - **Breaking:** Collecting jobs run `perform_calls(calls)`, which receives `ActiveJob::Coalescing::Call` objects. It replaces `perform(array)`. ([#27](https://github.com/dtcristo/solid_queue-coalesce/pull/27))
26
+ - **Breaking:** Each call stores its whole Active Job payload, and belongs to one job from the moment it's enqueued. ([#3](https://github.com/dtcristo/solid_queue-coalesce/pull/3), [#4](https://github.com/dtcristo/solid_queue-coalesce/pull/4))
27
+ - **Breaking:** Reaching `max_calls` seals a job, and by default doesn't dispatch it early. A sealed job waits for its time unless `on_full: :dispatch` is set, and each job takes its schedule from its first call. ([#27](https://github.com/dtcristo/solid_queue-coalesce/pull/27))
28
+ - **Breaking:** `coalesce_status` replaces `coalesced?`. The `:dropped` outcome is now `:discarded`. ([#3](https://github.com/dtcristo/solid_queue-coalesce/pull/3), [#17](https://github.com/dtcristo/solid_queue-coalesce/pull/17))
29
+ - **Breaking:** `action` in the `coalesce.solid_queue` payload is now `status`. ([#27](https://github.com/dtcristo/solid_queue-coalesce/pull/27))
30
+ - **Breaking:** `drop_coalesced_argument.solid_queue` is now `drop_coalesced_call.solid_queue`, and its `argument_id` is now `call_id`. ([#3](https://github.com/dtcristo/solid_queue-coalesce/pull/3))
31
+ - **Breaking:** `SolidQueue::CoalescedArgument` and its table are now `SolidQueue::CoalescedCall` and `solid_queue_coalesced_calls`. ([#3](https://github.com/dtcristo/solid_queue-coalesce/pull/3))
32
+ - **Breaking:** The key column uses the database's default collation, like Solid Queue's semaphores. Under a case-insensitive collation, keys that differ only by case now coalesce together. ([#3](https://github.com/dtcristo/solid_queue-coalesce/pull/3))
33
+ - **Breaking:** A retry runs all of the job's calls again. Calls can no longer be skipped with an `ActiveJob::Continuable` cursor over `perform`'s array. ([#27](https://github.com/dtcristo/solid_queue-coalesce/pull/27))
34
+ - Keys are released when a job starts, fails or gets destroyed, so a dispatcher no longer has to release stranded keys. ([#4](https://github.com/dtcristo/solid_queue-coalesce/pull/4))
35
+ - `ActiveJob.perform_all_later` works out keys and payloads before it writes anything, and stores one transaction per discard admission or collecting job. Wrap it in `SolidQueue::Record.transaction` for all-or-nothing. ([#16](https://github.com/dtcristo/solid_queue-coalesce/pull/16))
36
+ - Each collected call is rebuilt through the job's own `deserialize` and `deserialize_arguments`. ([#17](https://github.com/dtcristo/solid_queue-coalesce/pull/17))
37
+ - `SolidQueue::CoalescedCall.waiting` is worked out from the job that owns each call: it hasn't finished, isn't running and hasn't failed. ([#4](https://github.com/dtcristo/solid_queue-coalesce/pull/4), [#19](https://github.com/dtcristo/solid_queue-coalesce/pull/19))
38
+ - Jobs that aren't coalesced no longer read the keys table when they finish, fail or get destroyed. ([#18](https://github.com/dtcristo/solid_queue-coalesce/pull/18))
39
+ - The README starts with getting started, then recipes for deduping, debouncing and batching, with diagrams for timing, guidance on `coalesce` and `limits_concurrency`, and links to Solid Queue's docs. ([#29](https://github.com/dtcristo/solid_queue-coalesce/pull/29), [#31](https://github.com/dtcristo/solid_queue-coalesce/pull/31))
40
+ - The public API has RDoc comments, and the gem links to its [rubydoc.info](https://www.rubydoc.info/gems/solid_queue-coalesce) documentation. ([#31](https://github.com/dtcristo/solid_queue-coalesce/pull/31))
41
+
42
+ ### Removed
43
+
44
+ - **Breaking:** `SolidQueue::Job::CoalescedInBatchError` is gone, because coalesced jobs can now be part of a `SolidQueue::Batch`. ([#35](https://github.com/dtcristo/solid_queue-coalesce/pull/35))
45
+
46
+ ### Fixed
47
+
48
+ - Solid Queue's bulk discards release keys first and retry deadlocks, so they no longer lock in the opposite order to admission. ([#5](https://github.com/dtcristo/solid_queue-coalesce/pull/5))
49
+
50
+ ## [0.1.0] - 2026-10-30
51
+
52
+ The first release lets many `perform_later` calls with the same key share one pending Solid Queue job. Install it with the generator, and there's nothing to upgrade from.
53
+
54
+ ### Added
55
+
56
+ - First release, with `coalesce key:`, `collect:`, `limit:` and `flush_when_full:`. ([#1](https://github.com/dtcristo/solid_queue-coalesce/pull/1))
57
+ - Calls that share a key share one pending job, and the key is free again when that job starts. ([#1](https://github.com/dtcristo/solid_queue-coalesce/pull/1))
58
+ - The `solid_queue:coalesce:install` generator. ([#1](https://github.com/dtcristo/solid_queue-coalesce/pull/1))
59
+ - The `coalesce.solid_queue` and `drop_coalesced_argument.solid_queue` notifications. ([#1](https://github.com/dtcristo/solid_queue-coalesce/pull/1))
60
+ - Requires Solid Queue 1.7. ([#1](https://github.com/dtcristo/solid_queue-coalesce/pull/1))
61
+
62
+ [Unreleased]: https://github.com/dtcristo/solid_queue-coalesce/compare/v0.2.0...HEAD
63
+ [0.2.0]: https://github.com/dtcristo/solid_queue-coalesce/compare/v0.1.0...v0.2.0
64
+ [0.1.0]: https://github.com/dtcristo/solid_queue-coalesce/releases/tag/v0.1.0