From f8b6b19a8730a43e7f6dd192c056fbfa24a1a5a7 Mon Sep 17 00:00:00 2001 From: liuzx Date: Fri, 9 Dec 2022 11:29:25 +0800 Subject: [PATCH] fix-3241 --- routers/api/v1/repo/cloudbrain.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index b55529b51..a0dea0b86 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -765,6 +765,16 @@ func CloudbrainGetLog(ctx *context.APIContext) { 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"] //Logs can only be downloaded if the file exists