action_subscriber 1.5.0 → 1.5.1.pre0
Sign up to get free protection for your applications and to get access to all the features.
- 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 +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c849d8d45a4a0e167d37823d02d7c5b5be82e501
|
4
|
+
data.tar.gz: 9547cf8706d8af50904b4a4f87498270916d1110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 839968227dcf5b789adf36b489e0d4feb1950399b6657101a2d1a43f6614a895e5d1be30e8c57e4ce35da1a5ea45296ce3efdbb7e9028413a6cc748bbcef8d73
|
7
|
+
data.tar.gz: 4d928ed945e5dacb26cf3ebf38ff7dd27b3b9603e0722498bb1cfe2d0b8e0c65af1d90cdaabf0b1ad7f9d946b496f5e1cf15cdae263526941246ab2e15df8372
|
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: 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: 2015-11-
|
15
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -262,9 +262,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: '0'
|
263
263
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
264
|
requirements:
|
265
|
-
- - "
|
265
|
+
- - ">"
|
266
266
|
- !ruby/object:Gem::Version
|
267
|
-
version:
|
267
|
+
version: 1.3.1
|
268
268
|
requirements: []
|
269
269
|
rubyforge_project:
|
270
270
|
rubygems_version: 2.4.8
|