Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

If has only one node available and it can't handle work unit action, …

…break loop and add filter conditions.
  • Loading branch information...
commit f47d9d5b9c67c56751d1a0bbebb1e25a33197b71 1 parent 8f02680
@felipecvo felipecvo authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/cloud_crowd/models/work_unit.rb
View
1  lib/cloud_crowd/models/work_unit.rb
@@ -55,6 +55,7 @@ def self.distribute_to_nodes
end
work_units.push(unit)
available_nodes.push(node)
+ break if work_units.any? && available_nodes.one?
end
if work_units.any? && available_nodes.any?
filter = {:action => available_nodes.map {|node| node.actions }.flatten.uniq }
Please sign in to comment.
Something went wrong with that request. Please try again.