message_bus_client_worker 0.2.2 → 0.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28bc6b24718ddb2528590598d388599af7c00eeaee006cc825d4988468da590
|
4
|
+
data.tar.gz: c5cadec6eebf3af89437ffe6e98bc91d8af61df1ac75563af1d778bd77398791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7360cf009c8e71fafda5bf1b5a1f0171667b9bd329d54e0604f38da38977c535a67b990a9114782fcc2d3e4c2610b424dfa6a1562e39ac68a1f861de45c87dbb
|
7
|
+
data.tar.gz: 5994c3b930911a5f60361747168fa1988c3c57acbbfe5ebe96c68a663dee0ad8deb3c31a596d016d15eeb9177a96647fa567f84911c65156ad8f1fc63612dade
|
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.3.0] - 2018-09-24
|
8
|
+
### Added
|
9
|
+
- Log details of enqueued subscription
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
- Remove locks when jobs die
|
13
|
+
|
7
14
|
## [0.2.2] - 2018-09-15
|
8
15
|
### Fixed
|
9
16
|
- Problem where only one of two subscription workers were enqueued. Previous "fix" didn't work
|
data/Gemfile.lock
CHANGED
@@ -28,4 +28,15 @@ module MessageBusClientWorker
|
|
28
28
|
has :subscriptions, classes: Hash
|
29
29
|
end
|
30
30
|
|
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
|
+
|
31
40
|
end
|
41
|
+
|
42
|
+
MessageBusClientWorker.config_sidekiq!
|
@@ -9,8 +9,17 @@ module MessageBusClientWorker
|
|
9
9
|
on_conflict: :log,
|
10
10
|
)
|
11
11
|
|
12
|
-
def perform(host, subscriptions, long=false)
|
13
|
-
|
12
|
+
def perform(host, subscriptions, long = false)
|
13
|
+
log(host, subscriptions)
|
14
|
+
Poll.call(host, subscriptions.with_indifferent_access, long)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def log(host, subscriptions)
|
20
|
+
subscriptions.each do |subscription|
|
21
|
+
Sidekiq::Logging.logger.info "Enqueued #{host} for #{subscription}"
|
22
|
+
end
|
14
23
|
end
|
15
24
|
|
16
25
|
def self.unique_args(args)
|
@@ -19,4 +28,3 @@ module MessageBusClientWorker
|
|
19
28
|
|
20
29
|
end
|
21
30
|
end
|
22
|
-
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
33
|
spec.add_dependency "gem_config"
|
34
|
-
spec.add_dependency "sidekiq"
|
34
|
+
spec.add_dependency "sidekiq", ">= 5.1"
|
35
35
|
spec.add_dependency "http"
|
36
36
|
spec.add_dependency "addressable"
|
37
37
|
spec.add_dependency "light-service"
|
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.3.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-09-
|
11
|
+
date: 2018-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_config
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '5.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '5.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: http
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|