mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #15292 from gouqi11/fix/modelartsStatus
fix(region):modelarts task
This commit is contained in:
@@ -61,7 +61,9 @@ func (self *ModelartsPoolChangeConfigTask) OnInit(ctx context.Context, obj db.IS
|
||||
self.taskFailed(ctx, pool, errors.Wrapf(err, "iMp.ChangeConfig"))
|
||||
return
|
||||
}
|
||||
err = cloudprovider.WaitStatusWithDelay(iMp, api.MODELARTS_POOL_STATUS_RUNNING, 30*time.Second, 15*time.Second, 30*time.Minute)
|
||||
// withDelay
|
||||
time.Sleep(30 * time.Second)
|
||||
err = cloudprovider.WaitMultiStatus(iMp, []string{api.MODELARTS_POOL_STATUS_RUNNING, api.MODELARTS_POOL_STATUS_CHANGE_CONFIG_FAILED}, 15*time.Second, 2*time.Hour)
|
||||
if err != nil {
|
||||
self.taskFailed(ctx, pool, errors.Wrapf(err, "WaitStatusWithDelay"))
|
||||
return
|
||||
|
||||
@@ -69,7 +69,10 @@ func (self *ModelartsPoolCreateTask) OnInit(ctx context.Context, obj db.IStandal
|
||||
self.taskFailed(ctx, pool, errors.Wrapf(err, "db.SetExternalId"))
|
||||
return
|
||||
}
|
||||
err = cloudprovider.WaitStatusWithDelay(ipool, api.MODELARTS_POOL_STATUS_RUNNING, 30*time.Second, 15*time.Second, 30*time.Minute)
|
||||
|
||||
// withDelay
|
||||
time.Sleep(30 * time.Second)
|
||||
err = cloudprovider.WaitMultiStatus(ipool, []string{api.MODELARTS_POOL_STATUS_RUNNING, api.MODELARTS_POOL_STATUS_CREATE_FAILED}, 15*time.Second, 2*time.Hour)
|
||||
if err != nil {
|
||||
self.taskFailed(ctx, pool, errors.Wrapf(err, "db.WaitStatusWithDelay"))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user