cascade 0.0.7 → 0.0.8

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.
Files changed (2) hide show
  1. data/lib/cascade/worker.rb +4 -2
  2. metadata +3 -3
@@ -54,7 +54,9 @@ module Cascade
54
54
 
55
55
  if status.exitstatus != 0
56
56
  job_spec.reload
57
- job_spec.update_attributes(:last_error => 'Child process failure',
57
+ job_spec.update_attributes(:locked_at => nil,
58
+ :locked_by => nil,
59
+ :last_error => 'Child process failure',
58
60
  :failed_at => Time.now.utc)
59
61
  end
60
62
 
@@ -160,7 +162,7 @@ module Cascade
160
162
  :locked_at => nil
161
163
  }
162
164
 
163
- job_specs = JobSpec.where(conditions).limit(-num).sort([[:priority, 1], [:run_at, 1]]).all
165
+ job_specs = JobSpec.where(conditions).limit(-num).sort([[:priority, -1], [:run_at, 1]]).all
164
166
  job_specs
165
167
  end
166
168
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cascade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- requirement: &2157435440 !ruby/object:Gem::Requirement
17
+ requirement: &2157506340 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: '1.0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *2157435440
25
+ version_requirements: *2157506340
26
26
  description: ''
27
27
  email: andrew@andrewtimberlake.com
28
28
  executables: []