mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fixed an issue where waiting times were too long due to a lack of refresh operations (#40)
This commit is contained in:
@@ -752,6 +752,10 @@ func (self *SManagedVirtualizedGuestDriver) RequestRenewInstance(guest *models.S
|
||||
}
|
||||
//避免有些云续费后过期时间刷新比较慢问题
|
||||
cloudprovider.WaitCreated(15*time.Second, 5*time.Minute, func() bool {
|
||||
err := iVM.Refresh()
|
||||
if err != nil {
|
||||
log.Errorf("failed refresh instance %s error: %v", guest.Name, err)
|
||||
}
|
||||
newExipred := iVM.GetExpiredAt()
|
||||
if newExipred.After(oldExpired) {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user