cloud-crowd 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/cloud-crowd.gemspec +2 -2
- data/lib/cloud-crowd.rb +1 -1
- data/lib/cloud_crowd/models/work_unit.rb +2 -3
- metadata +4 -4
data/cloud-crowd.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'cloud-crowd'
|
3
|
-
s.version = '0.6.
|
4
|
-
s.date = '2011-03-
|
3
|
+
s.version = '0.6.1' # Keep version in sync with cloud-cloud.rb
|
4
|
+
s.date = '2011-03-12'
|
5
5
|
|
6
6
|
s.homepage = "http://wiki.github.com/documentcloud/cloud-crowd"
|
7
7
|
s.summary = "Parallel Processing for the Rest of Us"
|
data/lib/cloud-crowd.rb
CHANGED
@@ -45,7 +45,7 @@ module CloudCrowd
|
|
45
45
|
autoload :WorkUnit, 'cloud_crowd/models'
|
46
46
|
|
47
47
|
# Keep this version in sync with the gemspec.
|
48
|
-
VERSION = '0.6.
|
48
|
+
VERSION = '0.6.1'
|
49
49
|
|
50
50
|
# Increment the schema version when there's a backwards incompatible change.
|
51
51
|
SCHEMA_VERSION = 4
|
@@ -60,8 +60,6 @@ module CloudCrowd
|
|
60
60
|
available_nodes.push(node) unless node.busy?
|
61
61
|
next
|
62
62
|
end
|
63
|
-
else
|
64
|
-
unit.cancel_reservation
|
65
63
|
end
|
66
64
|
work_units.push(unit)
|
67
65
|
end
|
@@ -81,7 +79,8 @@ module CloudCrowd
|
|
81
79
|
# were none available.
|
82
80
|
def self.reserve_available(options={})
|
83
81
|
reservation = ActiveSupport::SecureRandom.random_number(MAX_RESERVATION)
|
84
|
-
|
82
|
+
conditions = "reservation is null and node_record_id is null and status in (#{INCOMPLETE.join(',')}) and #{options[:conditions]}"
|
83
|
+
any = WorkUnit.update_all("reservation = #{reservation}", conditions, options) > 0
|
85
84
|
any && reservation
|
86
85
|
end
|
87
86
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud-crowd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeremy Ashkenas
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-12 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|