mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 02:18:41 -05:00
Record clone times in Redis, add a '/status' API endpoint
This commit is contained in:
parent
11016fecdc
commit
ecd17606f6
2 changed files with 43 additions and 0 deletions
|
|
@ -230,6 +230,8 @@ module Vmpooler
|
|||
).wait_for_completion
|
||||
finish = '%.2f' % (Time.now-start)
|
||||
|
||||
$redis.hset('vmpooler__vm__'+vm['hostname'], 'clone_time', finish)
|
||||
|
||||
$logger.log('s', "[+] [#{vm['template']}] '#{vm['hostname']}' cloned from '#{vm['template']}' in #{finish} seconds")
|
||||
rescue
|
||||
$logger.log('s', "[!] [#{vm['template']}] '#{vm['hostname']}' clone appears to have failed")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue