action_subscriber 4.4.0.pre1-java → 4.4.0.pre2-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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fe3e9f8efec05473fbfdf80470c830571a3fbf443791c4a1ba2b734b3180056
|
4
|
+
data.tar.gz: fd5f12b1e85d98e6d22583a42bf9f7e23c3b534f00ee60e13814107b3c049c39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ae40be01a43d34bcfbf6c1529ade82c8a6bffd78780810a6a4b1a4218b10702247b3cbdae1cbbda78cbc9ca083d35f897e75efa9f95173ef80556991ad9599a
|
7
|
+
data.tar.gz: 7a1fcdd05959cc0bc1a2121f48ec5257f0d1826343fcbe21233fd23cadb2bb71588e6eed7570d61e3cad1aaaf76724ed358f3927fe04b9460c4156c30f2e7946
|
@@ -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
|
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
|
|
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.0.
|
4
|
+
version: 4.4.0.pre2
|
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-27 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|