job_boss 0.7.20 → 0.7.21
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.
- data/job_boss.gemspec +1 -1
- data/lib/job_boss/job.rb +4 -2
- metadata +3 -3
data/job_boss.gemspec
CHANGED
data/lib/job_boss/job.rb
CHANGED
|
@@ -177,7 +177,7 @@ module JobBoss
|
|
|
177
177
|
# sleep_interval specifies polling period
|
|
178
178
|
def wait_for_jobs(jobs = nil, sleep_interval = 0.5)
|
|
179
179
|
at_exit do
|
|
180
|
-
Job.not_completed.
|
|
180
|
+
Job.not_completed.find(jobs).each(&:cancel)
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
jobs = get_jobs(jobs)
|
|
@@ -213,7 +213,9 @@ module JobBoss
|
|
|
213
213
|
end
|
|
214
214
|
|
|
215
215
|
def cancelled?
|
|
216
|
-
self.where('cancelled_at IS
|
|
216
|
+
count = self.where('cancelled_at IS NULL').count
|
|
217
|
+
|
|
218
|
+
!(count > 0)
|
|
217
219
|
end
|
|
218
220
|
|
|
219
221
|
def cancel(jobs = nil)
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: job_boss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 41
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 7
|
|
9
|
-
-
|
|
10
|
-
version: 0.7.
|
|
9
|
+
- 21
|
|
10
|
+
version: 0.7.21
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Brian Underwood
|