Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

At begin of loop, clean up work unit's reservations if it has any.

  • Loading branch information...
commit f39cc7b2430ed420f3a2ddb5dce3005535850e8f 1 parent f47d9d5
@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
@@ -41,6 +41,7 @@ def self.distribute_to_nodes
reservation = nil
filter = {}
loop do
+ WorkUnit.cancel_reservations(reservation) if reservation
return unless reservation = WorkUnit.reserve_available(:limit => RESERVATION_LIMIT, :conditions => filter)
work_units = WorkUnit.reserved(reservation)
available_nodes = NodeRecord.available
Please sign in to comment.
Something went wrong with that request. Please try again.