Merge pull request 'fix deployinstance bugs' (#277) from tzwang/pcm-coordinator:master into master
This commit is contained in:
commit
dddbe7cd18
|
@ -45,8 +45,14 @@ func UpdateDeployInstanceStatus(svc *svc.ServiceContext, instance *models.AiInfe
|
|||
case storeLink.TYPE_OCTOPUS:
|
||||
switch ins.Status {
|
||||
case "running":
|
||||
if instance.Status == constants.Running {
|
||||
return
|
||||
}
|
||||
instance.Status = constants.Running
|
||||
case "stopped":
|
||||
if instance.Status == constants.Stopped {
|
||||
return
|
||||
}
|
||||
instance.Status = constants.Stopped
|
||||
default:
|
||||
instance.Status = ins.Status
|
||||
|
@ -54,8 +60,14 @@ func UpdateDeployInstanceStatus(svc *svc.ServiceContext, instance *models.AiInfe
|
|||
case storeLink.TYPE_MODELARTS:
|
||||
switch ins.Status {
|
||||
case "running":
|
||||
if instance.Status == constants.Running {
|
||||
return
|
||||
}
|
||||
instance.Status = constants.Running
|
||||
case "stopped":
|
||||
if instance.Status == constants.Stopped {
|
||||
return
|
||||
}
|
||||
instance.Status = constants.Stopped
|
||||
default:
|
||||
instance.Status = ins.Status
|
||||
|
@ -63,8 +75,14 @@ func UpdateDeployInstanceStatus(svc *svc.ServiceContext, instance *models.AiInfe
|
|||
case storeLink.TYPE_SHUGUANGAI:
|
||||
switch ins.Status {
|
||||
case "Running":
|
||||
if instance.Status == constants.Running {
|
||||
return
|
||||
}
|
||||
instance.Status = constants.Running
|
||||
case "Terminated":
|
||||
if instance.Status == constants.Stopped {
|
||||
return
|
||||
}
|
||||
instance.Status = constants.Stopped
|
||||
default:
|
||||
instance.Status = ins.Status
|
||||
|
|
Loading…
Reference in New Issue