action_subscriber 4.3.0-java → 4.4.0-java
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8ab791cc3202a714a5fc9772e692e6e8f994c03a7f1b7bf7a3ed3f1c0409a2ce
|
4
|
+
data.tar.gz: 86b53b5040ef683b689c230cefb391c82291ff7304b0b6aa0f28ff87f85ecc36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1722543d8a584ce8c652b1d670901e9afbfceb4ee52d75bda9b7a7c5f2e6b952232248ad2600740621966efe21a6fccd470398e7f7640964436a32ea198d0410
|
7
|
+
data.tar.gz: 0b7f54b8bf1e633971da938e0d0cf189bf3b4e98907b5b81bc182dd5c0fe2615f067a8cc98a46dd4445591f836f211d93711916cdb8e4e061e9e4d4e759600f4
|
data/bin/action_subscriber
CHANGED
@@ -40,18 +40,11 @@ module ActionSubscriber
|
|
40
40
|
::ActionSubscriber::Babou.start_subscribers
|
41
41
|
end
|
42
42
|
end
|
43
|
+
end
|
43
44
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
end
|
48
|
-
else
|
49
|
-
[:INT, :QUIT, :TERM].each do |signal|
|
50
|
-
trap(signal) do
|
51
|
-
::ActionSubscriber::Babou.stop_server!
|
52
|
-
exit 0
|
53
|
-
end
|
54
|
-
end
|
45
|
+
[:INT, :QUIT, :TERM].each do |signal|
|
46
|
+
trap(signal) do
|
47
|
+
::ActionSubscriber::Babou.stop_server!
|
55
48
|
end
|
56
49
|
end
|
57
50
|
|
data/lib/action_subscriber.rb
CHANGED
@@ -71,7 +71,7 @@ module ActionSubscriber
|
|
71
71
|
def self.stop_subscribers!(timeout = nil)
|
72
72
|
timeout ||= ::ActionSubscriber.configuration.seconds_to_wait_for_graceful_shutdown
|
73
73
|
route_set.cancel_consumers!
|
74
|
-
|
74
|
+
logger.info "waiting for threadpools to empty (maximum wait of #{timeout}sec)"
|
75
75
|
route_set.wait_to_finish_with_timeout(timeout)
|
76
76
|
end
|
77
77
|
|
@@ -15,6 +15,12 @@ module ActionSubscriber
|
|
15
15
|
sleep 1.0 #just hang around waiting for messages
|
16
16
|
break if shutting_down?
|
17
17
|
end
|
18
|
+
|
19
|
+
logger.info "Stopping subscribers..."
|
20
|
+
::ActionSubscriber.stop_subscribers!
|
21
|
+
logger.info "Shutting down"
|
22
|
+
::ActionSubscriber::RabbitConnection.subscriber_disconnect!
|
23
|
+
logger.info "Shutdown complete"
|
18
24
|
end
|
19
25
|
|
20
26
|
def self.logger
|
@@ -32,14 +38,7 @@ module ActionSubscriber
|
|
32
38
|
end
|
33
39
|
|
34
40
|
def self.stop_server!
|
35
|
-
# this method is called from within a TRAP context so we can't use the logger
|
36
41
|
@shutting_down = true
|
37
|
-
::Thread.new do
|
38
|
-
puts "Stopping subscribers..."
|
39
|
-
::ActionSubscriber.stop_subscribers!
|
40
|
-
puts "Shutting down"
|
41
|
-
::ActionSubscriber::RabbitConnection.subscriber_disconnect!
|
42
|
-
end.join
|
43
42
|
end
|
44
43
|
end
|
45
44
|
end
|
@@ -84,11 +84,11 @@ module ActionSubscriber
|
|
84
84
|
any_threadpools_busy = false
|
85
85
|
::ActionSubscriber::RabbitConnection.connection_threadpools.each do |name, executor|
|
86
86
|
next if executor.get_active_count <= 0
|
87
|
-
|
87
|
+
logger.info " -- Connection #{name} (active: #{executor.get_active_count}, queued: #{executor.get_queue.size})"
|
88
88
|
any_threadpools_busy = true
|
89
89
|
end
|
90
90
|
if !any_threadpools_busy
|
91
|
-
|
91
|
+
logger.info "Connection threadpools empty"
|
92
92
|
break
|
93
93
|
end
|
94
94
|
break if wait_loops >= timeout
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_subscriber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.4.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Brian Stien
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2017-07-
|
15
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
@@ -282,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
284
|
rubyforge_project:
|
285
|
-
rubygems_version: 2.6.
|
285
|
+
rubygems_version: 2.6.11
|
286
286
|
signing_key:
|
287
287
|
specification_version: 4
|
288
288
|
summary: ActionSubscriber is a DSL that allows a rails app to consume messages from
|