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 +4 -4
- data/CHANGELOG.md +64 -0
- data/README.md +800 -72
- data/UPGRADING.md +76 -0
- data/app/models/solid_queue/coalesce_key.rb +57 -67
- data/app/models/solid_queue/coalesced_call.rb +22 -0
- data/app/models/solid_queue/job/coalescible.rb +201 -89
- data/lib/active_job/coalescing.rb +226 -71
- data/lib/generators/solid_queue/coalesce/install/templates/db/create_solid_queue_coalesce_tables.rb +4 -9
- data/lib/solid_queue/coalesce/engine.rb +1 -1
- data/lib/solid_queue/coalesce/patches.rb +74 -24
- data/lib/solid_queue/coalesce/version.rb +1 -1
- metadata +9 -4
- data/app/models/solid_queue/coalesced_argument.rb +0 -15
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solid_queue-coalesce
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cristofaro
|
|
@@ -164,17 +164,20 @@ dependencies:
|
|
|
164
164
|
- !ruby/object:Gem::Version
|
|
165
165
|
version: '0'
|
|
166
166
|
description: Lets many perform_later calls with the same key share one pending Solid
|
|
167
|
-
Queue job
|
|
167
|
+
Queue job, for deduplicating jobs, unique pending jobs, debouncing, leading-edge
|
|
168
|
+
runs, and batching or collecting calls.
|
|
168
169
|
email:
|
|
169
170
|
- david@dtcristo.com
|
|
170
171
|
executables: []
|
|
171
172
|
extensions: []
|
|
172
173
|
extra_rdoc_files: []
|
|
173
174
|
files:
|
|
175
|
+
- CHANGELOG.md
|
|
174
176
|
- MIT-LICENSE
|
|
175
177
|
- README.md
|
|
178
|
+
- UPGRADING.md
|
|
176
179
|
- app/models/solid_queue/coalesce_key.rb
|
|
177
|
-
- app/models/solid_queue/
|
|
180
|
+
- app/models/solid_queue/coalesced_call.rb
|
|
178
181
|
- app/models/solid_queue/job/coalescible.rb
|
|
179
182
|
- lib/active_job/coalescing.rb
|
|
180
183
|
- lib/generators/solid_queue/coalesce/install/install_generator.rb
|
|
@@ -189,6 +192,8 @@ licenses:
|
|
|
189
192
|
metadata:
|
|
190
193
|
homepage_uri: https://github.com/dtcristo/solid_queue-coalesce
|
|
191
194
|
source_code_uri: https://github.com/dtcristo/solid_queue-coalesce
|
|
195
|
+
documentation_uri: https://www.rubydoc.info/gems/solid_queue-coalesce
|
|
196
|
+
changelog_uri: https://github.com/dtcristo/solid_queue-coalesce/blob/main/CHANGELOG.md
|
|
192
197
|
rdoc_options: []
|
|
193
198
|
require_paths:
|
|
194
199
|
- lib
|
|
@@ -205,5 +210,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
205
210
|
requirements: []
|
|
206
211
|
rubygems_version: 4.0.20
|
|
207
212
|
specification_version: 4
|
|
208
|
-
summary:
|
|
213
|
+
summary: Dedupe, debounce and batch Solid Queue jobs.
|
|
209
214
|
test_files: []
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module SolidQueue
|
|
4
|
-
# The serialized arguments of one collected perform_later call. It waits on a
|
|
5
|
-
# CoalesceKey until a job starts and claims it, and from then on it belongs to
|
|
6
|
-
# that job, across retries, until the job is destroyed.
|
|
7
|
-
class CoalescedArgument < Record
|
|
8
|
-
belongs_to :coalesce_key, optional: true
|
|
9
|
-
belongs_to :job, optional: true
|
|
10
|
-
|
|
11
|
-
serialize :arguments, coder: JSON
|
|
12
|
-
|
|
13
|
-
scope :waiting, -> { where.not(coalesce_key_id: nil) }
|
|
14
|
-
end
|
|
15
|
-
end
|