job_boss 0.7.13 → 0.7.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/job_boss.gemspec +1 -1
  2. data/lib/job_boss/job.rb +2 -1
  3. metadata +3 -3
data/job_boss.gemspec CHANGED
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "job_boss"
7
- s.version = '0.7.13'
7
+ s.version = '0.7.14'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Brian Underwood"]
10
10
  s.email = ["ml+job_boss@semi-sentient.com"]
data/lib/job_boss/job.rb CHANGED
@@ -11,6 +11,7 @@ module JobBoss
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
13
  scope :not_completed, where('completed_at IS NOT NULL')
14
+ scope :unfinished, where('completed_at IS NULL AND cancelled_at IS NULL')
14
15
  scope :mia, where("completed_at IS NOT NULL AND status = 'mia'")
15
16
 
16
17
  def prototype
@@ -183,7 +184,7 @@ module JobBoss
183
184
 
184
185
  ids = jobs.collect(&:id)
185
186
  Job.uncached do
186
- until Job.pending.find_all_by_id(ids).count == 0
187
+ until Job.unfinished.find_all_by_id(ids).count == 0
187
188
  sleep(sleep_interval)
188
189
 
189
190
  if block_given?
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: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 13
10
- version: 0.7.13
9
+ - 14
10
+ version: 0.7.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Underwood