sidekiq_publisher 1.6.0 → 1.6.1
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 +3 -0
- data/lib/sidekiq_publisher.rb +0 -1
- data/lib/sidekiq_publisher/publisher.rb +2 -4
- data/lib/sidekiq_publisher/runner.rb +2 -4
- data/lib/sidekiq_publisher/version.rb +1 -1
- data/sidekiq_publisher.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7602ef096d7de078a14d1360431e32df69ad3882a204345eed2591958fa8aa5e
|
|
4
|
+
data.tar.gz: c7a027148baaf5ec48baa4a5751120112f6aa278f436f178827c24641835c9fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebe145ed1294c46228624e54827872c5f2cbfafd71be6cb01f1bfeb35fe6f52e7a02a8fa9363f688102782fd235df480e3833e1c7ca1c820f753c26da7f8c575
|
|
7
|
+
data.tar.gz: a1abf505caebd3d353e587623f420d284f93e6c4676043cb0516d16b5203b1d2c035035bfbf09b2d6e955381b16dc4e6313394af3f06b7327453b56666117245
|
data/CHANGELOG.md
CHANGED
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
|
@@ -58,6 +58,5 @@ Gem::Specification.new do |spec|
|
|
|
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
61
|
spec.add_runtime_dependency "sidekiq", ">= 5.0.4", "< 6.1"
|
|
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.1
|
|
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-
|
|
11
|
+
date: 2019-12-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activejob
|
|
@@ -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
|
|
@@ -332,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
332
318
|
version: '0'
|
|
333
319
|
requirements: []
|
|
334
320
|
rubyforge_project:
|
|
335
|
-
rubygems_version: 2.7.
|
|
321
|
+
rubygems_version: 2.7.6.2
|
|
336
322
|
signing_key:
|
|
337
323
|
specification_version: 4
|
|
338
324
|
summary: Publisher for enqueuing jobs to Sidekiq
|