job_boss 0.7.21 → 0.8.0
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 +2 -4
- metadata +5 -5
data/job_boss.gemspec
CHANGED
data/lib/job_boss/job.rb
CHANGED
@@ -10,7 +10,7 @@ module JobBoss
|
|
10
10
|
scope :pending, where('started_at IS NULL AND cancelled_at IS NULL')
|
11
11
|
scope :running, where('started_at IS NOT NULL AND completed_at IS NULL')
|
12
12
|
scope :completed, where('completed_at IS NOT NULL')
|
13
|
-
scope :not_completed, where('completed_at IS
|
13
|
+
scope :not_completed, where('completed_at IS NULL')
|
14
14
|
scope :unfinished, where('completed_at IS NULL AND cancelled_at IS NULL')
|
15
15
|
scope :mia, where("completed_at IS NOT NULL AND status = 'mia'")
|
16
16
|
|
@@ -213,9 +213,7 @@ module JobBoss
|
|
213
213
|
end
|
214
214
|
|
215
215
|
def cancelled?
|
216
|
-
|
217
|
-
|
218
|
-
!(count > 0)
|
216
|
+
!!self.where('cancelled_at IS NOT NULL').first
|
219
217
|
end
|
220
218
|
|
221
219
|
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: 63
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 8
|
9
|
+
- 0
|
10
|
+
version: 0.8.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Underwood
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-28 00:00:00 -04:00
|
19
19
|
default_executable: job_boss
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|