job_boss 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/job_boss.gemspec +1 -1
- data/lib/job_boss/job.rb +4 -0
- metadata +8 -2
data/job_boss.gemspec
CHANGED
data/lib/job_boss/job.rb
CHANGED
@@ -172,6 +172,10 @@ module JobBoss
|
|
172
172
|
# Will cause the process to sleep until all specified jobs have completed
|
173
173
|
# sleep_interval specifies polling period
|
174
174
|
def wait_for_jobs(jobs = nil, sleep_interval = 0.5)
|
175
|
+
Signal.trap("HUP") do
|
176
|
+
jobs.each(&:cancel)
|
177
|
+
end
|
178
|
+
|
175
179
|
jobs = [jobs] if jobs.is_a?(Job)
|
176
180
|
jobs = self.scoped if jobs.nil?
|
177
181
|
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: job_boss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 9
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
9
|
+
- 7
|
10
|
+
version: 0.6.7
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Brian Underwood
|
@@ -25,6 +26,7 @@ dependencies:
|
|
25
26
|
requirements:
|
26
27
|
- - ">="
|
27
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
28
30
|
segments:
|
29
31
|
- 0
|
30
32
|
version: "0"
|
@@ -38,6 +40,7 @@ dependencies:
|
|
38
40
|
requirements:
|
39
41
|
- - ">="
|
40
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
41
44
|
segments:
|
42
45
|
- 0
|
43
46
|
version: "0"
|
@@ -51,6 +54,7 @@ dependencies:
|
|
51
54
|
requirements:
|
52
55
|
- - ">="
|
53
56
|
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
54
58
|
segments:
|
55
59
|
- 0
|
56
60
|
version: "0"
|
@@ -168,6 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
172
|
requirements:
|
169
173
|
- - ">="
|
170
174
|
- !ruby/object:Gem::Version
|
175
|
+
hash: 3
|
171
176
|
segments:
|
172
177
|
- 0
|
173
178
|
version: "0"
|
@@ -176,6 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
181
|
requirements:
|
177
182
|
- - ">="
|
178
183
|
- !ruby/object:Gem::Version
|
184
|
+
hash: 23
|
179
185
|
segments:
|
180
186
|
- 1
|
181
187
|
- 3
|