active_publisher 1.2.1-java → 1.2.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -2
- data/active_publisher.gemspec +1 -1
- data/lib/active_publisher/connection.rb +23 -0
- data/lib/active_publisher/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8b9c83ffe7b068d340c60ce3487b409eff93776ef7e1a431f7493aede45c7098
|
4
|
+
data.tar.gz: 9a5019a2d7be9a60ca2afa5e1b60b2dd122c599da029f5908c0933116801dd0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 586bca9328785ab472ce142fa2224dd20c16a3d2ddc1105b5dc8a98f67ed5d6fe23751074991a16ec6162327512373220bf11a84577eed62bc0027e8aa62c460
|
7
|
+
data.tar.gz: 7d4bfc3de040b8d27232f01c89794976667f3e607a30f01f6c99a747de6f42477168d775fdd749d797b15af9ad6814a6338ed3f98a299ba0c6b8a137773a8490
|
data/.travis.yml
CHANGED
data/active_publisher.gemspec
CHANGED
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency "connection_pool"
|
36
36
|
spec.add_development_dependency "fakeredis"
|
37
37
|
spec.add_development_dependency "pry"
|
38
|
-
spec.add_development_dependency "rake"
|
38
|
+
spec.add_development_dependency "rake"
|
39
39
|
spec.add_development_dependency "rspec", "~> 3.2"
|
40
40
|
end
|
@@ -31,9 +31,22 @@ module ActivePublisher
|
|
31
31
|
def self.create_connection
|
32
32
|
if ::RUBY_PLATFORM == "java"
|
33
33
|
connection = ::MarchHare.connect(connection_options)
|
34
|
+
connection.on_blocked do |reason|
|
35
|
+
on_blocked(reason)
|
36
|
+
end
|
37
|
+
connection.on_unblocked do
|
38
|
+
on_unblocked
|
39
|
+
end
|
40
|
+
connection
|
34
41
|
else
|
35
42
|
connection = ::Bunny.new(connection_options)
|
36
43
|
connection.start
|
44
|
+
connection.on_blocked do |blocked_message|
|
45
|
+
on_blocked(blocked_message.reason)
|
46
|
+
end
|
47
|
+
connection.on_unblocked do
|
48
|
+
on_unblocked
|
49
|
+
end
|
37
50
|
connection
|
38
51
|
end
|
39
52
|
end
|
@@ -58,5 +71,15 @@ module ActivePublisher
|
|
58
71
|
}
|
59
72
|
end
|
60
73
|
private_class_method :connection_options
|
74
|
+
|
75
|
+
def self.on_blocked(reason)
|
76
|
+
::ActiveSupport::Notifications.instrument("connection_blocked.active_publisher", :reason => reason)
|
77
|
+
end
|
78
|
+
private_class_method :on_blocked
|
79
|
+
|
80
|
+
def self.on_unblocked
|
81
|
+
::ActiveSupport::Notifications.instrument("connection_unblocked.active_publisher")
|
82
|
+
end
|
83
|
+
private_class_method :on_unblocked
|
61
84
|
end
|
62
85
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Brian Stien
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2020-
|
15
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,17 +143,17 @@ dependencies:
|
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- - "
|
146
|
+
- - ">="
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
version: '
|
148
|
+
version: '0'
|
149
149
|
name: rake
|
150
150
|
prerelease: false
|
151
151
|
type: :development
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
|
-
- - "
|
154
|
+
- - ">="
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: '
|
156
|
+
version: '0'
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: '0'
|
225
225
|
requirements: []
|
226
226
|
rubyforge_project:
|
227
|
-
rubygems_version: 2.
|
227
|
+
rubygems_version: 2.7.9
|
228
228
|
signing_key:
|
229
229
|
specification_version: 4
|
230
230
|
summary: Aims to make publishing work across MRI and jRuby painless and add some nice
|