Merge pull request 'fix instancelist bugs' (#321) from tzwang/pcm-coordinator:master into master
This commit is contained in:
commit
5789f5190b
|
@ -103,6 +103,15 @@ func (l *StartAllByDeployTaskIdLogic) startAll(list []*models.AiInferDeployInsta
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
ins.Status = "Updating"
|
||||
err = l.svcCtx.Scheduler.AiStorages.UpdateInferDeployInstance(ins, true)
|
||||
if err != nil {
|
||||
wg.Done()
|
||||
<-buf
|
||||
return
|
||||
}
|
||||
|
||||
wg.Done()
|
||||
<-buf
|
||||
}()
|
||||
|
|
|
@ -104,6 +104,15 @@ func (l *StopAllByDeployTaskIdLogic) stopAll(list []*models.AiInferDeployInstanc
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
ins.Status = "Updating"
|
||||
err = l.svcCtx.Scheduler.AiStorages.UpdateInferDeployInstance(ins, true)
|
||||
if err != nil {
|
||||
wg.Done()
|
||||
<-buf
|
||||
return
|
||||
}
|
||||
|
||||
wg.Done()
|
||||
<-buf
|
||||
}()
|
||||
|
|
|
@ -483,17 +483,6 @@ func (s *AiStorage) UpdateDeployTaskById(id int64) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
list, err := s.GetInstanceListByDeployTaskId(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, instance := range list {
|
||||
instance.Status = "Updating"
|
||||
err := s.UpdateInferDeployInstance(instance, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue