This commit is contained in:
Scott Schneider 2013-12-13 11:22:06 -08:00
parent 6611c210a5
commit 67ed2c8a2e

View file

@ -309,6 +309,7 @@ def check_pool pool
# LONG-RUNNING
$redis.smembers('vmware_host_pool__running__'+pool['name']).each do |vm|
if ($redis.hget('vmware_host_pool__active__'+pool['name'], vm))
running = (Time.now - Time.parse($redis.hget('vmware_host_pool__active__'+pool['name'], vm)))/60/60
if (running > 12)
$redis.smove('vmware_host_pool__running__'+pool['name'], 'vmware_host_pool__completed__'+pool['name'], vm)
@ -316,6 +317,7 @@ def check_pool pool
$logger.log('d', "[!] [#{pool['name']}] '#{vm}' reached end of TTL after 12 hours")
end
end
end
# REPOPULATE
total = $redis.scard('vmware_host_pool__ready__'+pool['name']) +