message_bus_client_worker 0.3.1 → 0.4.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 +7 -0
- data/Gemfile.lock +7 -26
- data/lib/message_bus_client_worker/services/polling/get_payloads.rb +5 -2
- data/lib/message_bus_client_worker/version.rb +1 -1
- data/lib/message_bus_client_worker/workers/subscription_worker.rb +1 -6
- data/lib/message_bus_client_worker.rb +1 -13
- data/message_bus_client_worker.gemspec +1 -2
- 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: 9d1ed898ee221c9db4f30d3e09e22455833341af7d7cc2beb12984489d75b0ac
|
|
4
|
+
data.tar.gz: 03f607cb696136a557a9e41e522d02db6a52ef786563bcff52ef1a81d2bb87dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a3f37a8f17607005fb3a49567199484afd7c1e5a5426ad169647b4b1ca0467130e915d96896e2ca82dcb7939cc6a785ad7d8943b4f87b53a4799b1a62d0181e
|
|
7
|
+
data.tar.gz: 0ba78f0e04ef3cb3fbe5368e7b17213db63cd427c64331064741df4d12f6b343fdaefcccc54f529702d6383a87b06b3595699aa07bb1889ac345ae5ba0f4e93f
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.4.0] - 2018-12-19
|
|
8
|
+
### Changed
|
|
9
|
+
- Change to excon. We know how to stream with that (make way for long polling)
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- Remove SidekiqUniqueJobs that sometimes caused this to never run
|
|
13
|
+
|
|
7
14
|
## [0.3.1] - 2018-10-07
|
|
8
15
|
### Fixed
|
|
9
16
|
- SubscriptionWorker retry is `0` so death handlers are executed
|
data/Gemfile.lock
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
message_bus_client_worker (0.
|
|
4
|
+
message_bus_client_worker (0.4.0)
|
|
5
5
|
activesupport
|
|
6
6
|
addressable
|
|
7
|
+
excon
|
|
7
8
|
gem_config
|
|
8
|
-
http
|
|
9
9
|
light-service
|
|
10
10
|
sidekiq (>= 5.1)
|
|
11
|
-
sidekiq-unique-jobs (>= 6.0.0)
|
|
12
11
|
|
|
13
12
|
GEM
|
|
14
13
|
remote: https://rubygems.org/
|
|
15
14
|
specs:
|
|
16
|
-
activesupport (5.2.
|
|
15
|
+
activesupport (5.2.2)
|
|
17
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
17
|
i18n (>= 0.7, < 2)
|
|
19
18
|
minitest (~> 5.1)
|
|
@@ -25,19 +24,9 @@ GEM
|
|
|
25
24
|
concurrent-ruby (1.0.5)
|
|
26
25
|
connection_pool (2.2.2)
|
|
27
26
|
diff-lcs (1.3)
|
|
28
|
-
|
|
29
|
-
unf (>= 0.0.5, < 1.0.0)
|
|
27
|
+
excon (0.62.0)
|
|
30
28
|
gem_config (0.3.1)
|
|
31
|
-
|
|
32
|
-
addressable (~> 2.3)
|
|
33
|
-
http-cookie (~> 1.0)
|
|
34
|
-
http-form_data (~> 2.0)
|
|
35
|
-
http_parser.rb (~> 0.6.0)
|
|
36
|
-
http-cookie (1.0.3)
|
|
37
|
-
domain_name (~> 0.5)
|
|
38
|
-
http-form_data (2.1.1)
|
|
39
|
-
http_parser.rb (0.6.0)
|
|
40
|
-
i18n (1.1.0)
|
|
29
|
+
i18n (1.2.0)
|
|
41
30
|
concurrent-ruby (~> 1.0)
|
|
42
31
|
light-service (0.11.0)
|
|
43
32
|
activesupport (>= 3.0)
|
|
@@ -50,7 +39,7 @@ GEM
|
|
|
50
39
|
byebug (~> 10.0)
|
|
51
40
|
pry (~> 0.10)
|
|
52
41
|
public_suffix (3.0.3)
|
|
53
|
-
rack (2.0.
|
|
42
|
+
rack (2.0.6)
|
|
54
43
|
rack-protection (2.0.3)
|
|
55
44
|
rack
|
|
56
45
|
rake (10.5.0)
|
|
@@ -76,17 +65,9 @@ GEM
|
|
|
76
65
|
connection_pool (~> 2.2, >= 2.2.0)
|
|
77
66
|
rack-protection (>= 1.5.0)
|
|
78
67
|
redis (>= 3.3.5, < 5)
|
|
79
|
-
sidekiq-unique-jobs (6.0.6)
|
|
80
|
-
concurrent-ruby (~> 1.0, >= 1.0.5)
|
|
81
|
-
sidekiq (>= 4.0, < 6.0)
|
|
82
|
-
thor (~> 0)
|
|
83
|
-
thor (0.20.0)
|
|
84
68
|
thread_safe (0.3.6)
|
|
85
69
|
tzinfo (1.2.5)
|
|
86
70
|
thread_safe (~> 0.1)
|
|
87
|
-
unf (0.1.4)
|
|
88
|
-
unf_ext
|
|
89
|
-
unf_ext (0.0.7.5)
|
|
90
71
|
wait (0.5.3)
|
|
91
72
|
|
|
92
73
|
PLATFORMS
|
|
@@ -102,4 +83,4 @@ DEPENDENCIES
|
|
|
102
83
|
wait
|
|
103
84
|
|
|
104
85
|
BUNDLED WITH
|
|
105
|
-
1.16.
|
|
86
|
+
1.16.6
|
|
@@ -7,8 +7,11 @@ module MessageBusClientWorker
|
|
|
7
7
|
promises :payloads
|
|
8
8
|
|
|
9
9
|
executed do |c|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
response = Excon.post(c.uri, {
|
|
11
|
+
query: c.params,
|
|
12
|
+
body: URI.encode_www_form(c.form_params)
|
|
13
|
+
})
|
|
14
|
+
c.payloads = JSON.parse(response.body.to_s)
|
|
12
15
|
end
|
|
13
16
|
end
|
|
14
17
|
end
|
|
@@ -2,12 +2,7 @@ module MessageBusClientWorker
|
|
|
2
2
|
class SubscriptionWorker
|
|
3
3
|
|
|
4
4
|
include Sidekiq::Worker
|
|
5
|
-
sidekiq_options
|
|
6
|
-
retry: 0,
|
|
7
|
-
lock: :until_executed,
|
|
8
|
-
unique_args: :unique_args,
|
|
9
|
-
on_conflict: :log,
|
|
10
|
-
)
|
|
5
|
+
sidekiq_options retry: 0
|
|
11
6
|
|
|
12
7
|
def perform(host, subscriptions, long = false)
|
|
13
8
|
log(host, subscriptions)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
require "addressable"
|
|
2
|
+
require "excon"
|
|
2
3
|
require "gem_config"
|
|
3
|
-
require "http"
|
|
4
4
|
require "light-service"
|
|
5
5
|
require "securerandom"
|
|
6
6
|
require "sidekiq"
|
|
7
|
-
require "sidekiq-unique-jobs"
|
|
8
7
|
require "active_support/core_ext/hash/indifferent_access"
|
|
9
8
|
require "active_support/core_ext/string/inflections"
|
|
10
9
|
require "message_bus_client_worker/version"
|
|
@@ -28,15 +27,4 @@ module MessageBusClientWorker
|
|
|
28
27
|
has :subscriptions, classes: Hash
|
|
29
28
|
end
|
|
30
29
|
|
|
31
|
-
def self.config_sidekiq!
|
|
32
|
-
Sidekiq.configure_server do |config|
|
|
33
|
-
config.death_handlers << ->(job, _ex) do
|
|
34
|
-
return unless job['unique_digest']
|
|
35
|
-
SidekiqUniqueJobs::Digests.del(digest: job['unique_digest'])
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
30
|
end
|
|
41
|
-
|
|
42
|
-
MessageBusClientWorker.config_sidekiq!
|
|
@@ -32,10 +32,9 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
|
|
33
33
|
spec.add_dependency "gem_config"
|
|
34
34
|
spec.add_dependency "sidekiq", ">= 5.1"
|
|
35
|
-
spec.add_dependency "
|
|
35
|
+
spec.add_dependency "excon"
|
|
36
36
|
spec.add_dependency "addressable"
|
|
37
37
|
spec.add_dependency "light-service"
|
|
38
|
-
spec.add_dependency "sidekiq-unique-jobs", ">= 6.0.0"
|
|
39
38
|
spec.add_dependency "activesupport"
|
|
40
39
|
|
|
41
40
|
spec.add_development_dependency "bundler", "~> 1.16"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: message_bus_client_worker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ramon Tayag
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-12-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gem_config
|
|
@@ -39,7 +39,7 @@ dependencies:
|
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '5.1'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: excon
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
@@ -80,20 +80,6 @@ dependencies:
|
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: sidekiq-unique-jobs
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - ">="
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: 6.0.0
|
|
90
|
-
type: :runtime
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - ">="
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: 6.0.0
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
84
|
name: activesupport
|
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|