sidekiq_publisher 2.0.1 → 2.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/Appraisals +18 -0
- data/CHANGELOG.md +20 -0
- data/README.md +12 -6
- data/lib/sidekiq_publisher/client.rb +2 -2
- data/lib/sidekiq_publisher/compatibility.rb +22 -0
- data/lib/sidekiq_publisher/version.rb +1 -1
- data/lib/sidekiq_publisher/worker.rb +1 -1
- data/lib/sidekiq_publisher.rb +1 -0
- data/sidekiq_publisher.gemspec +3 -3
- metadata +13 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 496067d05925ac3fbea1dfd0323640fbb809c32b836faca13d1e9184255ef45f
|
4
|
+
data.tar.gz: 9c3334f11ee9f436866a1f9cf438c0676575fee4e13e17cb41ef52ee62f6e5f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c92b6150ea19e96f388891f269903cf477d95983922bba38eb5192d3b6ef8e2dab319abdaf86722f01a5d5f8e4464ab96ae74647d25f74fc5934060e14eb7f0b
|
7
|
+
data.tar.gz: 69027c8e8202ba1b82c4ff221a88de668262e2086637848982c2a2bb8aa1c97d6a0eba52389642fcaf3b60da3684b4f38a607eb11029c205a85da96cc6f3ff92
|
data/Appraisals
CHANGED
@@ -36,6 +36,12 @@ appraise "rails-5.2-sidekiq-6.2" do
|
|
36
36
|
gem "sidekiq", "~> 6.2.0"
|
37
37
|
end
|
38
38
|
|
39
|
+
appraise "rails-5.2-sidekiq-6.3" do
|
40
|
+
gem "activejob", "~> 5.2.0"
|
41
|
+
gem "activesupport", "~> 5.2.0"
|
42
|
+
gem "sidekiq", "~> 6.3.0"
|
43
|
+
end
|
44
|
+
|
39
45
|
appraise "rails-6.0-sidekiq-5.2" do
|
40
46
|
gem "activejob", "~> 6.0.0"
|
41
47
|
gem "activesupport", "~> 6.0.0"
|
@@ -60,6 +66,12 @@ appraise "rails-6.0-sidekiq-6.2" do
|
|
60
66
|
gem "sidekiq", "~> 6.2.0"
|
61
67
|
end
|
62
68
|
|
69
|
+
appraise "rails-6.0-sidekiq-6.3" do
|
70
|
+
gem "activejob", "~> 6.0.0"
|
71
|
+
gem "activesupport", "~> 6.0.0"
|
72
|
+
gem "sidekiq", "~> 6.3.0"
|
73
|
+
end
|
74
|
+
|
63
75
|
appraise "rails-6.1-sidekiq-5.2" do
|
64
76
|
gem "activejob", "~> 6.1.0"
|
65
77
|
gem "activesupport", "~> 6.1.0"
|
@@ -83,3 +95,9 @@ appraise "rails-6.1-sidekiq-6.2" do
|
|
83
95
|
gem "activesupport", "~> 6.1.0"
|
84
96
|
gem "sidekiq", "~> 6.2.0"
|
85
97
|
end
|
98
|
+
|
99
|
+
appraise "rails-6.1-sidekiq-6.3" do
|
100
|
+
gem "activejob", "~> 6.1.0"
|
101
|
+
gem "activesupport", "~> 6.1.0"
|
102
|
+
gem "sidekiq", "~> 6.3.0"
|
103
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# sidekiq_publisher
|
2
2
|
|
3
|
+
## 2.2.0
|
4
|
+
- Add support for redis 5.0.0 by replacing pipelined commands.
|
5
|
+
- Also resolves deprecation warnings introduced in [redis 4.6.0]
|
6
|
+
|
7
|
+
[redis 4.6.0]: https://github.com/redis/redis-rb/blob/master/CHANGELOG.md#460
|
8
|
+
|
9
|
+
- Restricts sidekiq to < 6.4.2 due to an incompatability
|
10
|
+
- [issue tracking this](https://github.com/ezcater/sidekiq_publisher/issues/55)
|
11
|
+
|
12
|
+
- Restricts ddtrace to < 1.0.0 due to an incompatability
|
13
|
+
|
14
|
+
## 2.1.1
|
15
|
+
- Opt-in to [Rubygems MFA](https://guides.rubygems.org/mfa-requirement-opt-in/)
|
16
|
+
for privileged operations
|
17
|
+
|
18
|
+
## 2.1.0
|
19
|
+
- Add support for sidekiq `7.0.0` by using `Sidekiq::Job` instead of
|
20
|
+
`Sidekiq::Worker` in sidekiq `>= 6.3.0` to handle name changes outlined in
|
21
|
+
mperham/sidekiq#4971 and first introduced in 6.2.2.
|
22
|
+
|
3
23
|
## 2.0.1
|
4
24
|
- Changing the `Job#args` validator to be a manual check instead of using the `exclusions` validator. This is to fix an issue introduced with rails 6.1 and the condition of `in: [nil]`. More details [here](https://github.com/rails/rails/issues/41051).
|
5
25
|
|
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# sidekiq_publisher
|
2
2
|
|
3
|
-
[![CircleCI]
|
3
|
+
[![Gem Version][gem_badge]][gem_link] [![CircleCI][circle_badge]][circle_link]
|
4
|
+
|
5
|
+
[circle_badge]: https://circleci.com/gh/ezcater/sidekiq_publisher.svg?style=svg
|
6
|
+
[circle_link]: https://circleci.com/gh/ezcater/sidekiq_publisher
|
7
|
+
[gem_badge]: https://badge.fury.io/rb/sidekiq_publisher.svg
|
8
|
+
[gem_link]: https://badge.fury.io/rb/sidekiq_publisher
|
4
9
|
|
5
10
|
This gem provides support to enqueue jobs for Sidekiq by first staging the job
|
6
11
|
in Postgres and relying on a separate process to communicate with Sidekiq/Redis.
|
@@ -138,22 +143,23 @@ end
|
|
138
143
|
|
139
144
|
#### ActiveJob Exception Reporting
|
140
145
|
|
141
|
-
Many exception monitoring service (e.g. Sentry, Airbrake, Honeybadger, etc) already provide basic integration support for `Sidekiq`.
|
142
|
-
These integration should also work with `SidekiqPublisher`.
|
143
|
-
However, you may need to explicitly include
|
146
|
+
Many exception monitoring service (e.g. Sentry, Airbrake, Honeybadger, etc) already provide basic integration support for `Sidekiq`.
|
147
|
+
These integration should also work with `SidekiqPublisher`.
|
148
|
+
However, you may need to explicitly include
|
144
149
|
`ActiveJob::QueueAdapters::SidekiqPublisherAdapter` as a compatible adapter for this to work properly.
|
145
150
|
|
146
151
|
Alternatively, you can manually report the exception:
|
147
152
|
|
148
153
|
```ruby
|
149
154
|
retry_on SomeError, attempts: 10 do |_job, exception|
|
150
|
-
Raven.capture_exception(exception, extra: { custom: :foo }) # Reporting using the Sentry gem
|
155
|
+
Raven.capture_exception(exception, extra: { custom: :foo }) # Reporting using the Sentry gem
|
151
156
|
end
|
152
157
|
```
|
153
158
|
|
154
159
|
### SidekiqPublisher::Worker
|
155
160
|
|
156
|
-
Sidekiq workers are usually defined by including `Sidekiq::
|
161
|
+
Sidekiq workers are usually defined by including `Sidekiq::Job` or
|
162
|
+
`Sidekiq::Worker` in a class.
|
157
163
|
|
158
164
|
To use the `SidekiqPublisher`, this can be replaced by including
|
159
165
|
`SidekiqPublisher::Worker`. The usual `perform_async`, etc methods will be
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SidekiqPublisher
|
4
|
+
module Compatibility
|
5
|
+
class << self
|
6
|
+
# Sidekiq::Worker will be renamed to Sidekiq::Job in sidekiq 7.0.0 and a
|
7
|
+
# deprecation warning will be printed in sidekiq 6.4.0, per
|
8
|
+
# mperham/sidekiq#4971. Sidekiq 6.2.2 (mperham/sidekiq@8e36432) introduces
|
9
|
+
# an alias and 6.3.0 includes it when the gem is loaded. This alias is
|
10
|
+
# used here to ensure future compatibility.
|
11
|
+
def sidekiq_job_class
|
12
|
+
@_sidekiq_job_class ||= Gem::Dependency.new("sidekiq", ">= 6.3.0").then do |dependency|
|
13
|
+
if dependency.match?(Gem.loaded_specs["sidekiq"])
|
14
|
+
Sidekiq::Job
|
15
|
+
else
|
16
|
+
Sidekiq::Worker
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module SidekiqPublisher
|
4
4
|
module Worker
|
5
5
|
def self.included(base)
|
6
|
-
base.include(
|
6
|
+
base.include(SidekiqPublisher::Compatibility.sidekiq_job_class)
|
7
7
|
base.singleton_class.public_send(:alias_method, :sidekiq_client_push, :client_push)
|
8
8
|
base.extend(ClassMethods)
|
9
9
|
end
|
data/lib/sidekiq_publisher.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require "active_support"
|
4
4
|
require "active_support/core_ext/numeric/time"
|
5
5
|
require "sidekiq_publisher/version"
|
6
|
+
require "sidekiq_publisher/compatibility"
|
6
7
|
require "sidekiq_publisher/instrumenter"
|
7
8
|
require "sidekiq_publisher/metrics_reporter"
|
8
9
|
require "sidekiq_publisher/exception_reporter"
|
data/sidekiq_publisher.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
# Set "allowed_push_post" to control where this gem can be published.
|
18
18
|
if spec.respond_to?(:metadata)
|
19
19
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
-
|
20
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
21
21
|
else
|
22
22
|
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
23
|
end
|
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
|
|
47
47
|
spec.add_development_dependency "appraisal"
|
48
48
|
spec.add_development_dependency "bundler", "~> 1.12"
|
49
49
|
spec.add_development_dependency "database_cleaner"
|
50
|
-
spec.add_development_dependency "ddtrace", ">= 0.39.0"
|
50
|
+
spec.add_development_dependency "ddtrace", ">= 0.39.0", "< 1.0"
|
51
51
|
spec.add_development_dependency "ezcater_matchers"
|
52
52
|
spec.add_development_dependency "ezcater_rubocop", "1.0.2"
|
53
53
|
spec.add_development_dependency "factory_bot"
|
@@ -61,5 +61,5 @@ Gem::Specification.new do |spec|
|
|
61
61
|
|
62
62
|
spec.add_runtime_dependency "activerecord-postgres_pub_sub", ">= 0.4.0"
|
63
63
|
spec.add_runtime_dependency "activesupport", ">= 5.1", "< 6.2"
|
64
|
-
spec.add_runtime_dependency "sidekiq", ">= 5.0.4", "<
|
64
|
+
spec.add_runtime_dependency "sidekiq", ">= 5.0.4", "< 6.4.2"
|
65
65
|
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: 2.0
|
4
|
+
version: 2.2.0
|
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: 2022-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -73,6 +73,9 @@ dependencies:
|
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.39.0
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '1.0'
|
76
79
|
type: :development
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -80,6 +83,9 @@ dependencies:
|
|
80
83
|
- - ">="
|
81
84
|
- !ruby/object:Gem::Version
|
82
85
|
version: 0.39.0
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: ezcater_matchers
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -263,7 +269,7 @@ dependencies:
|
|
263
269
|
version: 5.0.4
|
264
270
|
- - "<"
|
265
271
|
- !ruby/object:Gem::Version
|
266
|
-
version:
|
272
|
+
version: 6.4.2
|
267
273
|
type: :runtime
|
268
274
|
prerelease: false
|
269
275
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -273,7 +279,7 @@ dependencies:
|
|
273
279
|
version: 5.0.4
|
274
280
|
- - "<"
|
275
281
|
- !ruby/object:Gem::Version
|
276
|
-
version:
|
282
|
+
version: 6.4.2
|
277
283
|
description: Publisher for enqueuing jobs to Sidekiq
|
278
284
|
email:
|
279
285
|
- engineering@ezcater.com
|
@@ -311,6 +317,7 @@ files:
|
|
311
317
|
- lib/generators/sidekiq_publisher/templates/create_sidekiq_publisher_jobs.rb
|
312
318
|
- lib/sidekiq_publisher.rb
|
313
319
|
- lib/sidekiq_publisher/client.rb
|
320
|
+
- lib/sidekiq_publisher/compatibility.rb
|
314
321
|
- lib/sidekiq_publisher/datadog_apm.rb
|
315
322
|
- lib/sidekiq_publisher/engine.rb
|
316
323
|
- lib/sidekiq_publisher/exception_reporter.rb
|
@@ -330,6 +337,7 @@ licenses:
|
|
330
337
|
- MIT
|
331
338
|
metadata:
|
332
339
|
allowed_push_host: https://rubygems.org
|
340
|
+
rubygems_mfa_required: 'true'
|
333
341
|
post_install_message:
|
334
342
|
rdoc_options: []
|
335
343
|
require_paths:
|
@@ -345,7 +353,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
345
353
|
- !ruby/object:Gem::Version
|
346
354
|
version: '0'
|
347
355
|
requirements: []
|
348
|
-
rubygems_version: 3.
|
356
|
+
rubygems_version: 3.3.7
|
349
357
|
signing_key:
|
350
358
|
specification_version: 4
|
351
359
|
summary: Publisher for enqueuing jobs to Sidekiq
|