Store and retrieve daily clone statistics from Redis db

This commit is contained in:
Scott Schneider 2015-02-03 14:14:12 -08:00
parent 3758e5e3f3
commit d6ade5ebef
3 changed files with 5 additions and 10 deletions

View file

@ -230,6 +230,7 @@ module Vmpooler
).wait_for_completion
finish = '%.2f' % (Time.now-start)
$redis.hset('vmpooler__clone__'+Date.today.to_s, vm['hostname'], finish)
$redis.hset('vmpooler__vm__'+vm['hostname'], 'clone_time', finish)
$logger.log('s', "[+] [#{vm['template']}] '#{vm['hostname']}' cloned from '#{vm['template']}' in #{finish} seconds")