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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02bfb6951b101ad86457fd06cf205ffc486ebbc60e38d82020b507bbdef7a719
4
- data.tar.gz: 970f3c1eee45e69b7b5a95e4bc1875308e793c1eb95b3c5371515e8721af9d78
3
+ metadata.gz: '067609f016376825479264cb9151d9dd8d306cdbbc019b2f2dbe08fa503eb01e'
4
+ data.tar.gz: 6b93fa60214589688a2e6e993bebbb92ba1d321f67dd9a6497a654b5e1cde438
5
5
  SHA512:
6
- metadata.gz: c736514d421542ac208fb4e3a065ca02d56957877ee58ec63aa5267cc51bfb34a173310869e1a733b28e51b717b4463eaf3361b9fcb064ca050caac27df1d18a
7
- data.tar.gz: 5902f22f92d0ca5ad307b3ced3d185cf43a189be7dc2266e5737260d9c06f3b7b28492ad6cc4117ac68444a6af3365085d7d90ad199a04e28c00526c021380ff
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
@@ -1,6 +1,18 @@
1
1
  # sidekiq_publisher
2
2
 
3
- ## v1.6.0 (unreleased)
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
 
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activejob", "~> 5.2.0"
6
+ gem "activesupport", "~> 5.2.0"
7
+ gem "sidekiq", "~> 6.1.0"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activejob", "~> 6.0.0"
6
+ gem "activesupport", "~> 6.0.0"
7
+ gem "sidekiq", "~> 6.1.0"
8
+
9
+ gemspec path: "../"
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "private_attr"
4
3
  require "sidekiq_publisher/version"
5
4
  require "sidekiq_publisher/report_unpublished_count"
6
5
  require "sidekiq_publisher/job"
@@ -7,7 +7,7 @@ module SidekiqPublisher
7
7
  def bulk_push(items)
8
8
  payloads = items.map do |item|
9
9
  normed = normalize_item(item)
10
- process_single(item["class"], normed)
10
+ process_single(item["class"], normed) || nil
11
11
  end.compact
12
12
 
13
13
  pushed = 0
@@ -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(
@@ -2,6 +2,9 @@
2
2
 
3
3
  namespace :sidekiq_publisher do
4
4
  task publish: [:environment] do
5
+ Signal.trap("INT") { exit(0) }
6
+ Signal.trap("TERM") { exit(0) }
7
+
5
8
  SidekiqPublisher::Runner.run
6
9
  end
7
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqPublisher
4
- VERSION = "1.6.0.pre0"
4
+ VERSION = "1.6.4"
5
5
  end
@@ -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 "private_attr"
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.0.pre0
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: 2019-12-10 00:00:00.000000000 Z
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: '6.1'
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: '6.1'
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: 1.3.1
320
+ version: '0'
333
321
  requirements: []
334
- rubyforge_project:
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