mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
Start keeping track of how long hosts are running
This commit is contained in:
parent
52861f4682
commit
d13a9fcf3a
2 changed files with 2 additions and 0 deletions
|
|
@ -197,6 +197,7 @@ end
|
|||
def destroy_vm vm, pool
|
||||
Thread.new {
|
||||
$redis.srem('vmware_host_pool__completed__'+pool, vm)
|
||||
$redis.hdel('vmware_host_pool__active__'+pool, vm)
|
||||
|
||||
host = $vsphere[pool].find_vms(vm)[vm]
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ post '/vm/:template' do
|
|||
|
||||
unless (vm.nil?)
|
||||
$redis.sadd('vmware_host_pool__running__'+params[:template], vm)
|
||||
$redis.hset('vmware_host_pool__active__'+params[:template], vm, Time.now)
|
||||
|
||||
result[params[:template]]['ok'] = true
|
||||
result[params[:template]]['hostname'] = vm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue