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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d78d0bc4ed217a100989f1076b7acb8dd74fd9a8
4
- data.tar.gz: c4ea83bc2cfccd5cbcd80c259d61e2fed54a8615
3
+ metadata.gz: c849d8d45a4a0e167d37823d02d7c5b5be82e501
4
+ data.tar.gz: 9547cf8706d8af50904b4a4f87498270916d1110
5
5
  SHA512:
6
- metadata.gz: 2af70abf0d6ff7d1fe7429a6cfce811e52b3aca97d609e676f46e9e678da54bc9c192ae6335d4e452fb5b1014e10693e0d51eb884fa6c6069d42c9d55152a7d4
7
- data.tar.gz: dbf6a1602536f2626dc23fc8facbc276d06df10ec6c969d5d937ac891b0492f4b44d79a43cc1758a38a0b0dfb7099ad0ffefb067afc9e5956db402cbb03cec94
6
+ metadata.gz: 839968227dcf5b789adf36b489e0d4feb1950399b6657101a2d1a43f6614a895e5d1be30e8c57e4ce35da1a5ea45296ce3efdbb7e9028413a6cc748bbcef8d73
7
+ data.tar.gz: 4d928ed945e5dacb26cf3ebf38ff7dd27b3b9603e0722498bb1cfe2d0b8e0c65af1d90cdaabf0b1ad7f9d946b496f5e1cf15cdae263526941246ab2e15df8372
@@ -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"
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
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-20 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
  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: '0'
267
+ version: 1.3.1
268
268
  requirements: []
269
269
  rubyforge_project:
270
270
  rubygems_version: 2.4.8