sidekiq_publisher 1.6.0.pre0 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +12 -0
- data/CHANGELOG.md +13 -1
- data/gemfiles/rails_5.2_sidekiq_6.1.gemfile +9 -0
- data/gemfiles/rails_6.0_sidekiq_6.1.gemfile +9 -0
- data/lib/sidekiq_publisher.rb +0 -1
- data/lib/sidekiq_publisher/client.rb +1 -1
- data/lib/sidekiq_publisher/publisher.rb +2 -4
- data/lib/sidekiq_publisher/runner.rb +2 -4
- data/lib/sidekiq_publisher/tasks.rake +3 -0
- data/lib/sidekiq_publisher/version.rb +1 -1
- data/sidekiq_publisher.gemspec +2 -3
- metadata +13 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '067609f016376825479264cb9151d9dd8d306cdbbc019b2f2dbe08fa503eb01e'
|
4
|
+
data.tar.gz: 6b93fa60214589688a2e6e993bebbb92ba1d321f67dd9a6497a654b5e1cde438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35eecd771b2561add98ffc2efa8661800e2b60bb6664918cd6de09906a6839bf515c4cff640e317ba16903b7ad4b36ceccfbbf894dcfaa2d2c1b8709b2615a9a
|
7
|
+
data.tar.gz: 508cb5e0d9e9af56c3a068c87520f1085b85dda2477fb49a467a00d9fc846b885f27c5ceffc732a4dd5e06a981ed247b76af0a33bfa86daa7ef64c45d3e8e7eb
|
data/Appraisals
CHANGED
@@ -29,6 +29,12 @@ appraise "rails-5.2-sidekiq-6.0" do
|
|
29
29
|
gem "sidekiq", "~> 6.0.1"
|
30
30
|
end
|
31
31
|
|
32
|
+
appraise "rails-5.2-sidekiq-6.1" do
|
33
|
+
gem "activejob", "~> 5.2.0"
|
34
|
+
gem "activesupport", "~> 5.2.0"
|
35
|
+
gem "sidekiq", "~> 6.1.0"
|
36
|
+
end
|
37
|
+
|
32
38
|
appraise "rails-6.0-sidekiq-5.2" do
|
33
39
|
gem "activejob", "~> 6.0.0"
|
34
40
|
gem "activesupport", "~> 6.0.0"
|
@@ -40,3 +46,9 @@ appraise "rails-6.0-sidekiq-6.0" do
|
|
40
46
|
gem "activesupport", "~> 6.0.0"
|
41
47
|
gem "sidekiq", "~> 6.0.1"
|
42
48
|
end
|
49
|
+
|
50
|
+
appraise "rails-6.0-sidekiq-6.1" do
|
51
|
+
gem "activejob", "~> 6.0.0"
|
52
|
+
gem "activesupport", "~> 6.0.0"
|
53
|
+
gem "sidekiq", "~> 6.1.0"
|
54
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
# sidekiq_publisher
|
2
2
|
|
3
|
-
## v1.6.
|
3
|
+
## v1.6.4
|
4
|
+
- Expand sidekiq support to v5.0.x-v6.x.x.
|
5
|
+
|
6
|
+
## v1.6.3
|
7
|
+
- Handle client middleware that returns false.
|
8
|
+
|
9
|
+
## v1.6.2
|
10
|
+
- Gracefully respond to `INT` and `TERM` process signals.
|
11
|
+
|
12
|
+
## v1.6.1
|
13
|
+
- Remove the `private_attr` top-level gem dependency.
|
14
|
+
|
15
|
+
## v1.6.0
|
4
16
|
- Support `Sidekiq::Testing` modes. This only applies to `SidekiqPublisher::Worker`
|
5
17
|
and not the `ActiveJob` adapter.
|
6
18
|
|
data/lib/sidekiq_publisher.rb
CHANGED
@@ -5,10 +5,6 @@ require "active_support/core_ext/object/try"
|
|
5
5
|
|
6
6
|
module SidekiqPublisher
|
7
7
|
class Publisher
|
8
|
-
extend PrivateAttr
|
9
|
-
|
10
|
-
private_attr_reader :client, :job_class_cache
|
11
|
-
|
12
8
|
def initialize
|
13
9
|
@client = SidekiqPublisher::Client.new
|
14
10
|
@job_class_cache = {}
|
@@ -37,6 +33,8 @@ module SidekiqPublisher
|
|
37
33
|
|
38
34
|
private
|
39
35
|
|
36
|
+
attr_reader :client, :job_class_cache
|
37
|
+
|
40
38
|
def publish_batch(batch, items)
|
41
39
|
pushed_count = client.bulk_push(items)
|
42
40
|
published_count = update_jobs_as_published!(batch)
|
@@ -4,13 +4,9 @@ require "activerecord-postgres_pub_sub"
|
|
4
4
|
|
5
5
|
module SidekiqPublisher
|
6
6
|
class Runner
|
7
|
-
extend PrivateAttr
|
8
|
-
|
9
7
|
LISTENER_TIMEOUT_SECONDS = 60
|
10
8
|
CHANNEL_NAME = "sidekiq_publisher_job"
|
11
9
|
|
12
|
-
private_attr_reader :publisher
|
13
|
-
|
14
10
|
def self.run
|
15
11
|
new.run
|
16
12
|
end
|
@@ -32,6 +28,8 @@ module SidekiqPublisher
|
|
32
28
|
|
33
29
|
private
|
34
30
|
|
31
|
+
attr_reader :publisher
|
32
|
+
|
35
33
|
def listener_timeout
|
36
34
|
if Job.unpublished.exists?
|
37
35
|
SidekiqPublisher.logger&.warn(
|
data/sidekiq_publisher.gemspec
CHANGED
@@ -54,10 +54,9 @@ Gem::Specification.new do |spec|
|
|
54
54
|
spec.add_development_dependency "rspec", "~> 3.4"
|
55
55
|
spec.add_development_dependency "rspec_junit_formatter", "0.2.2"
|
56
56
|
spec.add_development_dependency "shoulda-matchers"
|
57
|
-
spec.add_development_dependency "simplecov"
|
57
|
+
spec.add_development_dependency "simplecov", "< 0.18"
|
58
58
|
|
59
59
|
spec.add_runtime_dependency "activerecord-postgres_pub_sub", ">= 0.4.0"
|
60
60
|
spec.add_runtime_dependency "activesupport", ">= 5.1", "< 6.1"
|
61
|
-
spec.add_runtime_dependency "
|
62
|
-
spec.add_runtime_dependency "sidekiq", ">= 5.0.4", "< 6.1"
|
61
|
+
spec.add_runtime_dependency "sidekiq", ">= 5.0.4", "< 7.0"
|
63
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq_publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ezCater, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -196,16 +196,16 @@ dependencies:
|
|
196
196
|
name: simplecov
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- - "
|
199
|
+
- - "<"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '0'
|
201
|
+
version: '0.18'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - "
|
206
|
+
- - "<"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '0'
|
208
|
+
version: '0.18'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: activerecord-postgres_pub_sub
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -240,20 +240,6 @@ dependencies:
|
|
240
240
|
- - "<"
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '6.1'
|
243
|
-
- !ruby/object:Gem::Dependency
|
244
|
-
name: private_attr
|
245
|
-
requirement: !ruby/object:Gem::Requirement
|
246
|
-
requirements:
|
247
|
-
- - ">="
|
248
|
-
- !ruby/object:Gem::Version
|
249
|
-
version: '0'
|
250
|
-
type: :runtime
|
251
|
-
prerelease: false
|
252
|
-
version_requirements: !ruby/object:Gem::Requirement
|
253
|
-
requirements:
|
254
|
-
- - ">="
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: '0'
|
257
243
|
- !ruby/object:Gem::Dependency
|
258
244
|
name: sidekiq
|
259
245
|
requirement: !ruby/object:Gem::Requirement
|
@@ -263,7 +249,7 @@ dependencies:
|
|
263
249
|
version: 5.0.4
|
264
250
|
- - "<"
|
265
251
|
- !ruby/object:Gem::Version
|
266
|
-
version: '
|
252
|
+
version: '7.0'
|
267
253
|
type: :runtime
|
268
254
|
prerelease: false
|
269
255
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -273,7 +259,7 @@ dependencies:
|
|
273
259
|
version: 5.0.4
|
274
260
|
- - "<"
|
275
261
|
- !ruby/object:Gem::Version
|
276
|
-
version: '
|
262
|
+
version: '7.0'
|
277
263
|
description: Publisher for enqueuing jobs to Sidekiq
|
278
264
|
email:
|
279
265
|
- engineering@ezcater.com
|
@@ -293,8 +279,10 @@ files:
|
|
293
279
|
- gemfiles/rails_5.2_sidekiq_5.1.gemfile
|
294
280
|
- gemfiles/rails_5.2_sidekiq_5.2.gemfile
|
295
281
|
- gemfiles/rails_5.2_sidekiq_6.0.gemfile
|
282
|
+
- gemfiles/rails_5.2_sidekiq_6.1.gemfile
|
296
283
|
- gemfiles/rails_6.0_sidekiq_5.2.gemfile
|
297
284
|
- gemfiles/rails_6.0_sidekiq_6.0.gemfile
|
285
|
+
- gemfiles/rails_6.0_sidekiq_6.1.gemfile
|
298
286
|
- lib/active_job/queue_adapters/sidekiq_publisher_adapter.rb
|
299
287
|
- lib/generators/sidekiq_publisher/install_generator.rb
|
300
288
|
- lib/generators/sidekiq_publisher/templates/create_sidekiq_publisher_jobs.rb
|
@@ -327,12 +315,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
327
315
|
version: '0'
|
328
316
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
329
317
|
requirements:
|
330
|
-
- - "
|
318
|
+
- - ">="
|
331
319
|
- !ruby/object:Gem::Version
|
332
|
-
version:
|
320
|
+
version: '0'
|
333
321
|
requirements: []
|
334
|
-
|
335
|
-
rubygems_version: 2.7.9
|
322
|
+
rubygems_version: 3.0.3
|
336
323
|
signing_key:
|
337
324
|
specification_version: 4
|
338
325
|
summary: Publisher for enqueuing jobs to Sidekiq
|