action_subscriber 4.4.0.pre1 → 4.4.0.pre2

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
  SHA1:
3
- metadata.gz: 41394d2670a7fc6eb769238be15295938c349916
4
- data.tar.gz: 360ab71b4df25808f40434cae94aeec5e031b274
3
+ metadata.gz: 3d01dff0781c64978615b89b36c41e7c20156bdf
4
+ data.tar.gz: c89cd86ed65822acd2d6c5f643a926b66c481ea6
5
5
  SHA512:
6
- metadata.gz: c0a0a4c54d4e3aa0ea4070c30f8eff64d6c759c4a38f4fac9d7f802a0df9f0f496972485c1365349fcec72cbfd66f0674b67892ab9adea130748a2ece8a54a2b
7
- data.tar.gz: f86b951f4d131f6956ebd4e76ecdadf29f441f7795c547fd6b16139dca68fee51013facac888f46cd30acf3db85d5909be7a6af488651ba6067c8c5504ac667b
6
+ metadata.gz: 695f6be2e0c311342d71b64ca6766bddc0c6dfe1d24deb75b0e57508b1895bd29c17548f270b4d086bb5cf198c999b541be76f89472a536d105bd7165b0471e0
7
+ data.tar.gz: 151cf8b4ef9e00933430574823770681a913c716cd63e16d5302cc50f300d3b769a884d0a322e596c4ea03f189aac779677e49c4406b01fd3204a261a6dc9fd5
@@ -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
- puts " -- Connection #{name} (active: #{executor.get_active_count}, queued: #{executor.get_queue.size})"
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
- puts "Connection threadpools empty"
91
+ logger.info "Connection threadpools empty"
92
92
  break
93
93
  end
94
94
  break if wait_loops >= timeout
@@ -1,3 +1,3 @@
1
1
  module ActionSubscriber
2
- VERSION = "4.4.0.pre1"
2
+ VERSION = "4.4.0.pre2"
3
3
  end
@@ -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
- puts "waiting for threadpools to empty (maximum wait of #{timeout}sec)"
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.pre1
4
+ version: 4.4.0.pre2
5
5
  platform: ruby
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-24 00:00:00.000000000 Z
15
+ date: 2017-07-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport