|
|
|
@@ -291,6 +291,7 @@ func queryTaskStatusFromCloudbrain(job *models.Cloudbrain) { |
|
|
|
} else { |
|
|
|
// |
|
|
|
job.Status = string(models.ModelSafetyTesting) |
|
|
|
job.EndTime = 0 |
|
|
|
err = models.UpdateJob(job) |
|
|
|
if err != nil { |
|
|
|
log.Error("UpdateJob failed:", err) |
|
|
|
@@ -443,6 +444,9 @@ func updateJobFailed(job *models.Cloudbrain, msg string) { |
|
|
|
//update task failed. |
|
|
|
job.Status = string(models.ModelArtsTrainJobFailed) |
|
|
|
job.ResultJson = msg |
|
|
|
job.EndTime = timeutil.TimeStampNow() |
|
|
|
job.Duration = (int64(job.EndTime) - int64(job.StartTime)) / 1000 |
|
|
|
job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) |
|
|
|
err := models.UpdateJob(job) |
|
|
|
if err != nil { |
|
|
|
log.Error("UpdateJob failed:", err) |
|
|
|
|