job_boss 0.7.15 → 0.7.16

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 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.15'
7
+ s.version = '0.7.16'
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/boss.rb CHANGED
@@ -117,7 +117,6 @@ module JobBoss
117
117
  # Priority of a particular queue determines how many jobs get pulled from that queue each time we dequeue
118
118
  # A priority adjustment is also done to give greater priority to sets of jobs which have been running longer
119
119
  def dequeue_jobs
120
- logger.info "Dequeuing jobs"
121
120
  Job.pending.select('DISTINCT priority, path, batch_id').reorder(nil).collect do |distinct_job|
122
121
  queue_scope = Job.where(:path => distinct_job.path, :batch_id => distinct_job.batch_id)
123
122
 
data/lib/job_boss/job.rb CHANGED
@@ -213,9 +213,7 @@ module JobBoss
213
213
  end
214
214
 
215
215
  def cancelled?
216
- count = self.where('cancelled_at IS NULL').count
217
-
218
- !(count > 0)
216
+ self.where('cancelled_at IS NOT NULL').count == 0
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: 29
4
+ hash: 35
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 15
10
- version: 0.7.15
9
+ - 16
10
+ version: 0.7.16
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-04-02 00:00:00 -04:00
18
+ date: 2011-04-18 00:00:00 -04:00
19
19
  default_executable: job_boss
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency