mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
Check for 'checkout' key if calculating 'running' time
This commit is contained in:
parent
c4ad99c493
commit
f3979de5ef
1 changed files with 1 additions and 1 deletions
|
|
@ -426,7 +426,7 @@ module Vmpooler
|
||||||
|
|
||||||
if rdata['destroy']
|
if rdata['destroy']
|
||||||
result[params[:hostname]]['running'] = ((Time.parse(rdata['destroy']) - Time.parse(rdata['checkout'])) / 60 / 60).round(2)
|
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)
|
result[params[:hostname]]['running'] = ((Time.now - Time.parse(rdata['checkout'])) / 60 / 60).round(2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue