As-is, TTL-cleanup is an hour off

This commit changes calculation from "greater than" to "greater
than or equal to" TTL.
This commit is contained in:
Scott Schneider 2015-01-13 14:29:44 -08:00
parent 27a8f5dbbb
commit 1a8f457ced

View file

@ -146,7 +146,7 @@ module Vmpooler
if (
(host.runtime) and
(host.runtime.bootTime)
((((Time.now - host.runtime.bootTime)/60).to_s[/^\d+\.\d{1}/].to_f) > ttl)
((((Time.now - host.runtime.bootTime)/60).to_s[/^\d+\.\d{1}/].to_f) >= ttl)
)
$redis.smove('vmpooler__running__'+pool, 'vmpooler__completed__'+pool, vm)