cloud-crowd 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'cloud-crowd'
3
- s.version = '0.6.1' # Keep version in sync with cloud-cloud.rb
4
- s.date = '2011-03-12'
3
+ s.version = '0.6.2' # Keep version in sync with cloud-cloud.rb
4
+ s.date = '2011-04-14'
5
5
 
6
6
  s.homepage = "http://wiki.github.com/documentcloud/cloud-crowd"
7
7
  s.summary = "Parallel Processing for the Rest of Us"
@@ -20,7 +20,6 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ['lib']
21
21
  s.executables = ['crowd']
22
22
 
23
- s.has_rdoc = true
24
23
  s.extra_rdoc_files = ['README']
25
24
  s.rdoc_options << '--title' << 'CloudCrowd | Parallel Processing for the Rest of Us' <<
26
25
  '--exclude' << 'test' <<
@@ -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.1'
48
+ VERSION = '0.6.2'
49
49
 
50
50
  # Increment the schema version when there's a backwards incompatible change.
51
51
  SCHEMA_VERSION = 4
@@ -54,19 +54,18 @@ module CloudCrowd
54
54
 
55
55
  # Round robin through the nodes and units, sending the unit if the node
56
56
  # is able to process it.
57
- while (node = available_nodes.shift) && (unit = work_units.shift) do
58
- if node.actions.include?(unit.action)
59
- if node.send_work_unit(unit)
60
- available_nodes.push(node) unless node.busy?
61
- next
57
+ work_units.each do |unit|
58
+ available_nodes.each do |node|
59
+ if node.actions.include? unit.action
60
+ if node.send_work_unit unit
61
+ work_units.delete unit
62
+ available_nodes.delete node if node.busy?
63
+ break
64
+ end
62
65
  end
63
66
  end
64
- work_units.push(unit)
65
67
  end
66
68
 
67
- # If there are both units and nodes left over, try again.
68
- next if work_units.any? && available_nodes.any?
69
-
70
69
  # If we still have units at this point, or we're fresh out of nodes,
71
70
  # that means we're done.
72
71
  return if work_units.any? || available_nodes.empty?
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: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.6.1
9
+ - 2
10
+ version: 0.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Ashkenas
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-12 00:00:00 -06:00
19
- default_executable:
18
+ date: 2011-04-14 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: sinatra
@@ -255,7 +254,6 @@ files:
255
254
  - test/unit/test_work_unit.rb
256
255
  - views/operations_center.erb
257
256
  - bin/crowd
258
- has_rdoc: true
259
257
  homepage: http://wiki.github.com/documentcloud/cloud-crowd
260
258
  licenses: []
261
259
 
@@ -291,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
289
  requirements: []
292
290
 
293
291
  rubyforge_project: cloud-crowd
294
- rubygems_version: 1.4.2
292
+ rubygems_version: 1.7.2
295
293
  signing_key:
296
294
  specification_version: 3
297
295
  summary: Parallel Processing for the Rest of Us