mirror of
https://github.com/puppetlabs/vmpooler-provider-vsphere.git
synced 2026-01-26 11:28:40 -05:00
(maint) Convert booleans and Time objects to strings when being added to redis
This commit is contained in:
parent
47176e6b5b
commit
9fa1072a32
1 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ module Vmpooler
|
|||
redis.multi do |transaction|
|
||||
transaction.srem("vmpooler__completed__#{pool}", vm_name)
|
||||
transaction.hdel("vmpooler__active__#{pool}", vm_name)
|
||||
transaction.hset("vmpooler__vm__#{vm_name}", 'destroy', Time.now)
|
||||
transaction.hset("vmpooler__vm__#{vm_name}", 'destroy', Time.now.to_s)
|
||||
|
||||
# Auto-expire metadata key
|
||||
transaction.expire("vmpooler__vm__#{vm_name}", (data_ttl * 60 * 60))
|
||||
|
|
@ -1139,7 +1139,7 @@ module Vmpooler
|
|||
@redis.with_metrics do |redis|
|
||||
redis.multi do |transaction|
|
||||
transaction.hset("vmpooler__vm__#{vm_name}", 'host', target_host_name)
|
||||
transaction.hset("vmpooler__vm__#{vm_name}", 'migrated', true)
|
||||
transaction.hset("vmpooler__vm__#{vm_name}", 'migrated', 'true')
|
||||
end
|
||||
end
|
||||
logger.log('s', "[>] [#{pool_name}] '#{vm_name}' migrated from #{vm_hash['host_name']} to #{target_host_name} in #{finish} seconds")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue