Permalink
Browse files

Fix logic to be as documented

  • Loading branch information...
1 parent 1225d40 commit 9d47e20bc3784ae40ff53ab0c129e31401a0e2f8 @ripienaar ripienaar committed Oct 1, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 agent/puppetd/mc-puppetd
View
@@ -36,21 +36,21 @@ def log(msg)
puts("#{Time.now}> #{msg}")
end
-# Checks concurrent runs every second and returns once its
+# Checks concurrent runs every second and returns once its
# below the given threshold
def waitfor(concurrency, client)
logged = false
loop do
running = client.status.inject(0) {|s,v| s += v[:data][:running] }
- return running if running <= concurrency
+ return running if running < concurrency
log("Currently #{running} nodes running, waiting") unless logged
logged = true
- sleep 0.5
+ sleep 1
end
end

0 comments on commit 9d47e20

Please sign in to comment.