resqued 0.7.10 → 0.7.11

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: ce7631acfa66d7a6304040677347a590e4c8b228
4
- data.tar.gz: 75ef7fb35ce15af4c6a822923ec87dafb045e459
3
+ metadata.gz: 67705e27820d6fe8873c3f5956496b0663f86967
4
+ data.tar.gz: 14e287bc2245039f2a95cfadd93687b0bf93f1a5
5
5
  SHA512:
6
- metadata.gz: bb0b962f81017fd01923398777f08eea1d6de730dbe497aa5771e196eb4debb3cea73a2b24954e0f17ac49950a5bc600be3994d343303f54df9792dfa813afc5
7
- data.tar.gz: 8c3a8685eb36b6f34ea2fcaf5d1376c16e08425e23216a6c630aad8dc1d229cc6d55555d3dd643db1f92e780fe1ddfa2e1fa67ca71868c4cb81968ddb86ad234
6
+ metadata.gz: d0025656e2d27f34ff858b738678dd1ddb767b3ccf6bf44051baf8d70a9ae226b364f81ec8489f4e404e659141b28caadee32302194064c8c4e13e44d98b372b
7
+ data.tar.gz: 71b5360eee39da10fb65713cf33b4e1fdd60792a1099eec76aa9c098602dccd8dd624b11f97108cfd2df8491c81d42e16a08627aad355296c05d321e0d7e106e
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  Starting with version 0.6.1, resqued uses semantic versioning to indicate incompatibilities between the master process, listener process, and configuration.
2
2
 
3
+ v0.7.11
4
+ -------
5
+
6
+ * Show worker count in more proclines. (#32)
7
+
3
8
  v0.7.10
4
9
  -------
5
10
 
data/docs/processes.md CHANGED
@@ -13,7 +13,7 @@ When the workers are idle:
13
13
 
14
14
  ```
15
15
  -+= 77038 burke resqued master [gen 1] [1 running] config/resqued.rb
16
- \-+- 77208 burke resqued listener 1 [running] config/resqued.rb
16
+ \-+- 77208 burke resqued listener #1 6/6/6 [running] config/resqued.rb
17
17
  |--- 77492 burke resque-1.24.1: Waiting for import_high
18
18
  |--- 77493 burke resque-1.24.1: Waiting for import_high
19
19
  |--- 77494 burke resque-1.24.1: Waiting for important,import_low
@@ -26,7 +26,7 @@ When the workers are working:
26
26
 
27
27
  ```
28
28
  -+= 77038 burke resqued master [gen 1] [1 running] config/resqued.rb
29
- \-+- 51166 burke resqued listener 1 [running] config/resqued.rb
29
+ \-+- 51166 burke resqued listener #1 6/6/6 [running] config/resqued.rb
30
30
  |-+- 51638 burke resque-1.24.1: Forked 78947 at 1377103813
31
31
  | \--- 78947 burke SlowJob::ImportHigh 23 seconds remaining...
32
32
  |-+- 51639 burke resque-1.24.1: Forked 78948 at 1377103813
@@ -45,7 +45,7 @@ During restart, there should be no more workers than the configuration specifies
45
45
 
46
46
  ```
47
47
  -+= 51121 burke resqued master [gen 2] [2 running] config/resqued.rb
48
- |-+- 51166 burke resqued listener 1 [shutdown] config/resqued.rb
48
+ |-+- 51166 burke resqued listener #1 4/4/6 [shutdown] config/resqued.rb
49
49
  | |-+- 51638 burke resque-1.24.1: Forked 78947 at 1377103813
50
50
  | | \--- 78947 burke SlowJob::ImportHigh 23 seconds remaining...
51
51
  | |-+- 51639 burke resque-1.24.1: Forked 78948 at 1377103813
@@ -54,7 +54,7 @@ During restart, there should be no more workers than the configuration specifies
54
54
  | | \--- 78950 burke SlowJob::Normal 4 seconds remaining...
55
55
  | \-+- 51643 burke resque-1.24.1: Forked 78949 at 1377103813
56
56
  | \--- 78949 burke SlowJob::Normal 4 seconds remaining...
57
- \-+- 79528 burke resqued listener 2 [running] config/resqued.rb
57
+ \-+- 79528 burke resqued listener #2 2/6/6 [running] config/resqued.rb
58
58
  |-+- 79907 burke resque-1.24.1: Forked 79920 at 1377103819
59
59
  | \--- 79920 burke SlowJob::ImportLow 29 seconds remaining...
60
60
  \-+- 79908 burke resque-1.24.1: Forked 79921 at 1377103819
@@ -96,6 +96,7 @@ module Resqued
96
96
  reap_workers(Process::WNOHANG)
97
97
  check_for_expired_workers
98
98
  start_idle_workers
99
+ write_procline('running')
99
100
  case signal = SIGNAL_QUEUE.shift
100
101
  when nil
101
102
  yawn
@@ -141,6 +142,11 @@ module Resqued
141
142
  partition_workers.last
142
143
  end
143
144
 
145
+ # Private: just the workers running as children of this listener.
146
+ def my_workers
147
+ workers.select { |worker| worker.running_here? }
148
+ end
149
+
144
150
  # Private: Split the workers into [not-running, running]
145
151
  def partition_workers
146
152
  workers.partition { |worker| worker.idle? }
@@ -233,10 +239,10 @@ module Resqued
233
239
  # Private.
234
240
  def write_procline(status)
235
241
  procline = "#{procline_version} listener"
236
- procline << " #{@listener_id}" if @listener_id
242
+ procline << " \##{@listener_id}" if @listener_id
243
+ procline << " #{my_workers.size}/#{running_workers.size}/#{workers.size}" if workers
237
244
  procline << " [#{info.app_version}]" if info.app_version
238
245
  procline << " [#{status}]"
239
- procline << " [#{running_workers.size} workers]" if status == 'shutdown'
240
246
  procline << " #{@config_paths.join(' ')}"
241
247
  $0 = procline
242
248
  end
@@ -1,3 +1,3 @@
1
1
  module Resqued
2
- VERSION = '0.7.10'
2
+ VERSION = '0.7.11'
3
3
  end
@@ -27,6 +27,11 @@ module Resqued
27
27
  pid.nil?
28
28
  end
29
29
 
30
+ # Public: True if this worker is running in this process.
31
+ def running_here?
32
+ !idle? && @self_started
33
+ end
34
+
30
35
  # Public: A string that compares if this worker is equivalent to a worker in another Resqued::Listener.
31
36
  def queue_key
32
37
  queues.sort.join(';')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resqued
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Burke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2014-04-04 00:00:00.000000000 Z
11
+ date: 2014-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kgio