resqued 0.7.10 → 0.7.11
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/CHANGES.md +5 -0
- data/docs/processes.md +4 -4
- data/lib/resqued/listener.rb +8 -2
- data/lib/resqued/version.rb +1 -1
- data/lib/resqued/worker.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67705e27820d6fe8873c3f5956496b0663f86967
|
4
|
+
data.tar.gz: 14e287bc2245039f2a95cfadd93687b0bf93f1a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0025656e2d27f34ff858b738678dd1ddb767b3ccf6bf44051baf8d70a9ae226b364f81ec8489f4e404e659141b28caadee32302194064c8c4e13e44d98b372b
|
7
|
+
data.tar.gz: 71b5360eee39da10fb65713cf33b4e1fdd60792a1099eec76aa9c098602dccd8dd624b11f97108cfd2df8491c81d42e16a08627aad355296c05d321e0d7e106e
|
data/CHANGES.md
CHANGED
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
|
data/lib/resqued/listener.rb
CHANGED
@@ -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 << "
|
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
|
data/lib/resqued/version.rb
CHANGED
data/lib/resqued/worker.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kgio
|