mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 10:28:41 -05:00
Revert "(POOLER-81) Add time_remaining information (#276)"
This reverts commit 1910cffaf7.
This commit is contained in:
parent
df9c1e1c9b
commit
2cf5c2314c
2 changed files with 1 additions and 24 deletions
|
|
@ -644,10 +644,7 @@ module Vmpooler
|
|||
result[params[:hostname]]['running'] = ((Time.parse(rdata['destroy']) - Time.parse(rdata['checkout'])) / 60 / 60).round(2)
|
||||
result[params[:hostname]]['state'] = 'destroyed'
|
||||
elsif rdata['checkout']
|
||||
running = Time.now - Time.parse(rdata['checkout'])
|
||||
result[params[:hostname]]['running'] = format("%02dh %02dm %02ds", running / (60 * 60), (running / 60) % 60, running % 60)
|
||||
remaining = Time.parse(rdata['checkout']) + rdata['lifetime'].to_i*60*60 - Time.now
|
||||
result[params[:hostname]]['time_remaining'] = format("%02dh %02dm %02ds", remaining / (60 * 60), (remaining / 60) % 60, remaining % 60)
|
||||
result[params[:hostname]]['running'] = ((Time.now - Time.parse(rdata['checkout'])) / 60 / 60).round(2)
|
||||
result[params[:hostname]]['state'] = 'running'
|
||||
elsif rdata['check']
|
||||
result[params[:hostname]]['state'] = 'ready'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue