mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Use break instead of return in migrate_vm connection pool
This commit switches the early `return` in `migrate_vm`'s connection pooling block to a `break`, since `return` implies you are returning something from a method and I don't think `migrate_vm` wants to do that. This is a place where a partial type system like Sorbet seems useful because then we'd have some idea about what the intended return is here.
This commit is contained in:
parent
392232fb6a
commit
57d2010db0
1 changed files with 1 additions and 1 deletions
|
|
@ -974,7 +974,7 @@ module Vmpooler
|
||||||
if migration_enabled? @config
|
if migration_enabled? @config
|
||||||
if migration_count >= migration_limit
|
if migration_count >= migration_limit
|
||||||
logger.log('s', "[ ] [#{pool_name}] '#{vm_name}' is running on #{vm_hash['host_name']}. No migration will be evaluated since the migration_limit has been reached")
|
logger.log('s', "[ ] [#{pool_name}] '#{vm_name}' is running on #{vm_hash['host_name']}. No migration will be evaluated since the migration_limit has been reached")
|
||||||
return
|
break
|
||||||
end
|
end
|
||||||
run_select_hosts(pool_name, @provider_hosts)
|
run_select_hosts(pool_name, @provider_hosts)
|
||||||
if vm_in_target?(pool_name, vm_hash['host_name'], vm_hash['architecture'], @provider_hosts)
|
if vm_in_target?(pool_name, vm_hash['host_name'], vm_hash['architecture'], @provider_hosts)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue