|
|
|
@@ -17,7 +17,7 @@ func UpdateDeployInstanceStatusBatch(svc *svc.ServiceContext, insList []*models. |
|
|
|
|
|
|
|
if needfilter { |
|
|
|
for i := len(list) - 1; i >= 0; i-- { |
|
|
|
if list[i].Status == constants.Running || list[i].Status == constants.Stopped { |
|
|
|
if list[i].Status == constants.Running || list[i].Status == constants.Stopped || list[i].Status == constants.Failed { |
|
|
|
list = append(list[:i], list[i+1:]...) |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -176,6 +176,15 @@ func UpdateDeployInstanceStatus(svc *svc.ServiceContext, instance *models.AiInfe |
|
|
|
return |
|
|
|
} |
|
|
|
instance.Status = constants.Stopped |
|
|
|
case "CREATED_FAILED": |
|
|
|
if instance.Status == constants.Failed { |
|
|
|
if ch != nil { |
|
|
|
<-ch |
|
|
|
return |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
instance.Status = constants.Failed |
|
|
|
default: |
|
|
|
instance.Status = ins.Status |
|
|
|
} |
|
|
|
|