action_subscriber 1.5.0.pre0-java → 1.5.1.pre0-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
  SHA1:
3
- metadata.gz: a94323c253370a76ee96bd864d127d123e8a663b
4
- data.tar.gz: 51296c551d198c48573ac6c6325b08f02b13736f
3
+ metadata.gz: c25c60d1bd97b9955dfe8d1267a3085fb7703ba6
4
+ data.tar.gz: ee3cdf9a50ba2e0f31a901b8701b8f2e7aea3374
5
5
  SHA512:
6
- metadata.gz: 305da3551674623fbb60aef2d48fb221e95c42c5ed640a749ad4a32bbe76beebda2eaa2fa79f84217482bb8c27534a6fbaeecfada127e8b5da00f96c811a0ab5
7
- data.tar.gz: 1bcfef1772ee2f62a3f775a7357280ed0c677fec5126d514378b06421e0fd876d51aea4b26f16d673b259173e72599f3491455156bb4cacef00a6db99fc748da
6
+ metadata.gz: 003f0d7bc544b9f868259b667da3a58b9594db2ee9f9925971f15f50a2131765e1200af1ba0a0ef52dfa4d07e8d41d9c2afe30760e6bea37307109c8c60cd8b6
7
+ data.tar.gz: dc1c369f198565cd31a927d7ec6e961047d961fd2f3aaa8005e6fce58c62f2b55efab5b70464e30573342c26dbcfcff8312c1cc108cca39674d49a0e65338af6
@@ -65,7 +65,9 @@ trap(:USR2) {
65
65
  Action Subscriber Stats
66
66
  Pool Size: #{ ::ActionSubscriber.config.threadpool_size }
67
67
  Ready Size: #{ ::ActionSubscriber::Threadpool.ready_size }
68
+ Jobs Waiting in Queue: #{ ::ActionSubscriber::Threadpool.number_of_jobs_queued }
68
69
  CONFIG
70
+ ActionSubscriber::Threadpool.print_threadpool_stackraces
69
71
  }
70
72
 
71
73
  ::ActionSubscriber::CLI.start(ARGV)
@@ -7,6 +7,10 @@ module ActionSubscriber
7
7
  (pool.pool_size == pool.busy_size)
8
8
  end
9
9
 
10
+ def self.number_of_jobs_queued
11
+ pool.instance_variable_get('@queued_jobs').size
12
+ end
13
+
10
14
  def self.perform_async(*args)
11
15
  self.pool.async.perform(*args)
12
16
  end
@@ -17,6 +21,16 @@ module ActionSubscriber
17
21
  )
18
22
  end
19
23
 
24
+ def self.print_threadpool_stackraces
25
+ $stderr.puts "ActionSubscriber :: Threadpool stacktraces\n"
26
+ pool.instance_variable_get('@busy_threads').each do |thread|
27
+ $stderr.puts <<-THREAD_TRACE
28
+ #{thread.inspect}:
29
+ #{thread.backtrace.try(:join, $INPUT_RECORD_SEPARATOR)}"
30
+ THREAD_TRACE
31
+ end
32
+ end
33
+
20
34
  def self.ready?
21
35
  !busy?
22
36
  end
@@ -1,3 +1,3 @@
1
1
  module ActionSubscriber
2
- VERSION = "1.5.0.pre0"
2
+ VERSION = "1.5.1.pre0"
3
3
  end
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: 1.5.0.pre0
4
+ version: 1.5.1.pre0
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: 2015-11-12 00:00:00.000000000 Z
15
+ date: 2015-11-24 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  version: 1.3.1
267
267
  requirements: []
268
268
  rubyforge_project:
269
- rubygems_version: 2.4.8
269
+ rubygems_version: 2.5.0
270
270
  signing_key:
271
271
  specification_version: 4
272
272
  summary: ActionSubscriber is a DSL that allows a rails app to consume messages from a RabbitMQ broker.