Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1^2
zouap 4 years ago
parent
commit
2b0a3b5c93
1 changed files with 0 additions and 13 deletions
  1. +0
    -13
      modules/storage/obs.go

+ 0
- 13
modules/storage/obs.go View File

@@ -389,10 +389,6 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) {
} }
fileName = str1[len(str1)-2] fileName = str1[len(str1)-2]
isDir = true isDir = true
<<<<<<< HEAD
nextParentDir = fileName
if fileName == parentDir || (fileName+"/") == setting.OutPutPath {
=======
if parentDir == "" { if parentDir == "" {
nextParentDir = fileName nextParentDir = fileName
} else { } else {
@@ -400,7 +396,6 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) {
} }


if fileName == strPrefix[len(strPrefix)-1] || (fileName+"/") == setting.OutPutPath { if fileName == strPrefix[len(strPrefix)-1] || (fileName+"/") == setting.OutPutPath {
>>>>>>> origin/liuzx_trainjob
continue continue
} }
} else { } else {
@@ -417,8 +412,6 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) {
FileName: fileName, FileName: fileName,
Size: val.Size, Size: val.Size,
IsDir: isDir, IsDir: isDir,
<<<<<<< HEAD
=======
ParenDir: nextParentDir, ParenDir: nextParentDir,
} }
fileInfos = append(fileInfos, fileInfo) fileInfos = append(fileInfos, fileInfo)
@@ -475,7 +468,6 @@ func GetVersionObsListObject(jobName, parentDir string) ([]FileInfo, error) {
FileName: fileName, FileName: fileName,
Size: val.Size, Size: val.Size,
IsDir: isDir, IsDir: isDir,
>>>>>>> origin/liuzx_trainjob
ParenDir: nextParentDir, ParenDir: nextParentDir,
} }
fileInfos = append(fileInfos, fileInfo) fileInfos = append(fileInfos, fileInfo)
@@ -514,14 +506,9 @@ func ObsGenMultiPartSignedUrl(uuid string, uploadId string, partNumber int, file


func GetObsCreateSignedUrlByBucketAndKey(bucket, key string) (string, error) { func GetObsCreateSignedUrlByBucketAndKey(bucket, key string) (string, error) {
input := &obs.CreateSignedUrlInput{} input := &obs.CreateSignedUrlInput{}
<<<<<<< HEAD
input.Bucket = bucket input.Bucket = bucket
input.Key = key input.Key = key
=======
input.Bucket = setting.Bucket
input.Key = strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, setting.OutPutPath, parentDir, fileName), "/")


>>>>>>> origin/liuzx_trainjob
input.Expires = 60 * 60 input.Expires = 60 * 60
input.Method = obs.HttpMethodGet input.Method = obs.HttpMethodGet
comma := strings.LastIndex(key, "/") comma := strings.LastIndex(key, "/")


Loading…
Cancel
Save