Browse Source

提交代码,解决下载日志问题。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.10.1^2
zouap 3 years ago
parent
commit
95a492fa64
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/api/v1/repo/cloudbrain.go

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

@@ -428,8 +428,7 @@ func CloudbrainDownloadLogFile(ctx *context.Context) {
if job.JobType == string(models.JobTypeInference) {
logDir = cloudbrain.ResultPath
}
prefix := "/" + setting.CBCodePathPrefix + job.JobName + logDir
files, err := storage.GetOneLevelAllObjectUnderDirMinio(setting.Attachment.Minio.Bucket, prefix, "")
files, err := storage.GetOneLevelAllObjectUnderDirMinio(setting.Attachment.Minio.Bucket, setting.CBCodePathPrefix+job.JobName+logDir, "")
if err != nil {
log.Error("query cloudbrain model failed: %v", err)
return
@@ -442,6 +441,7 @@ func CloudbrainDownloadLogFile(ctx *context.Context) {
}
}
if fileName != "" {
prefix := "/" + setting.CBCodePathPrefix + job.JobName + logDir
url, err := storage.Attachments.PresignedGetURL(prefix+"/"+fileName, fileName)
if err != nil {
log.Error("Get minio get SignedUrl failed: %v", err.Error(), ctx.Data["msgID"])


Loading…
Cancel
Save