Check for 'checkout' key if calculating 'running' time

This commit is contained in:
Scott Schneider 2015-04-30 18:30:13 -07:00
parent c4ad99c493
commit f3979de5ef

View file

@ -426,7 +426,7 @@ module Vmpooler
if rdata['destroy']
result[params[:hostname]]['running'] = ((Time.parse(rdata['destroy']) - Time.parse(rdata['checkout'])) / 60 / 60).round(2)
else
elsif rdata['checkout']
result[params[:hostname]]['running'] = ((Time.now - Time.parse(rdata['checkout'])) / 60 / 60).round(2)
end