mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Merge pull request #266 from mattkirby/pooler_31
(POOLER-31) Expire redis vm key when clone fails
This commit is contained in:
commit
0ce66eb763
2 changed files with 11 additions and 1 deletions
|
|
@ -245,7 +245,9 @@ module Vmpooler
|
|||
|
||||
$metrics.timing("clone.#{pool_name}", finish)
|
||||
rescue => _err
|
||||
$redis.srem('vmpooler__pending__' + pool_name, new_vmname)
|
||||
$redis.srem("vmpooler__pending__#{pool_name}", new_vmname)
|
||||
expiration_ttl = $config[:redis]['data_ttl'].to_i * 60 * 60
|
||||
$redis.expire("vmpooler__vm__#{new_vmname}", expiration_ttl)
|
||||
raise _err
|
||||
ensure
|
||||
$redis.decr('vmpooler__tasks__clone')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue