Browse Source

fix-3241

fix-3221-v1
liuzx 2 years ago
parent
commit
f8b6b19a87
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      routers/api/v1/repo/cloudbrain.go

+ 10
- 0
routers/api/v1/repo/cloudbrain.go View File

@@ -765,6 +765,16 @@ func CloudbrainGetLog(ctx *context.APIContext) {
content = content + ctx.Data["existStr"].(string) content = content + ctx.Data["existStr"].(string)
} }


if (job.JobType == string(models.JobTypeTrain) || job.JobType == string(models.JobTypeInference)) && job.Type == models.TypeCloudBrainOne && job.Status == string(models.JobFailed) {
if ctx.Data["existStr"] != nil {
content = content + ctx.Data["existStr"].(string)
}
} else {
if ctx.Data["existStr"] != nil && result["Lines"].(int) < 50 {
content = content + ctx.Data["existStr"].(string)
}
}

logFileName := result["FileName"] logFileName := result["FileName"]


//Logs can only be downloaded if the file exists //Logs can only be downloaded if the file exists


Loading…
Cancel
Save