action_subscriber 1.5.0.pre0-java → 1.5.1.pre0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/action_subscriber +2 -0
- data/lib/action_subscriber/threadpool.rb +14 -0
- data/lib/action_subscriber/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c25c60d1bd97b9955dfe8d1267a3085fb7703ba6
|
4
|
+
data.tar.gz: ee3cdf9a50ba2e0f31a901b8701b8f2e7aea3374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 003f0d7bc544b9f868259b667da3a58b9594db2ee9f9925971f15f50a2131765e1200af1ba0a0ef52dfa4d07e8d41d9c2afe30760e6bea37307109c8c60cd8b6
|
7
|
+
data.tar.gz: dc1c369f198565cd31a927d7ec6e961047d961fd2f3aaa8005e6fce58c62f2b55efab5b70464e30573342c26dbcfcff8312c1cc108cca39674d49a0e65338af6
|
data/bin/action_subscriber
CHANGED
@@ -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
|
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.
|
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-
|
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.
|
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.
|