|
|
|
@@ -300,10 +300,19 @@ func queryTaskStatusFromCloudbrainTwo(job *models.Cloudbrain) { |
|
|
|
log.Info("query train job error." + err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
job.Status = modelarts.TransTrainJobStatus(result.IntStatus) |
|
|
|
job.Duration = result.Duration |
|
|
|
job.Duration = result.Duration / 1000 |
|
|
|
job.TrainJobDuration = result.TrainJobDuration |
|
|
|
|
|
|
|
if job.StartTime == 0 && result.StartTime > 0 { |
|
|
|
job.StartTime = timeutil.TimeStamp(result.StartTime / 1000) |
|
|
|
} |
|
|
|
job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) |
|
|
|
if job.EndTime == 0 && models.IsTrainJobTerminal(job.Status) && job.StartTime > 0 { |
|
|
|
job.EndTime = job.StartTime.Add(job.Duration) |
|
|
|
} |
|
|
|
job.CorrectCreateUnix() |
|
|
|
|
|
|
|
if job.Status != string(models.ModelArtsTrainJobCompleted) { |
|
|
|
log.Info("CloudbrainTwo task status=" + job.Status) |
|
|
|
err = models.UpdateJob(job) |
|
|
|
|