|
|
|
@@ -389,10 +389,6 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) { |
|
|
|
} |
|
|
|
fileName = str1[len(str1)-2] |
|
|
|
isDir = true |
|
|
|
<<<<<<< HEAD |
|
|
|
nextParentDir = fileName |
|
|
|
if fileName == parentDir || (fileName+"/") == setting.OutPutPath { |
|
|
|
======= |
|
|
|
if parentDir == "" { |
|
|
|
nextParentDir = fileName |
|
|
|
} else { |
|
|
|
@@ -400,7 +396,6 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) { |
|
|
|
} |
|
|
|
|
|
|
|
if fileName == strPrefix[len(strPrefix)-1] || (fileName+"/") == setting.OutPutPath { |
|
|
|
>>>>>>> origin/liuzx_trainjob |
|
|
|
continue |
|
|
|
} |
|
|
|
} else { |
|
|
|
@@ -417,8 +412,6 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) { |
|
|
|
FileName: fileName, |
|
|
|
Size: val.Size, |
|
|
|
IsDir: isDir, |
|
|
|
<<<<<<< HEAD |
|
|
|
======= |
|
|
|
ParenDir: nextParentDir, |
|
|
|
} |
|
|
|
fileInfos = append(fileInfos, fileInfo) |
|
|
|
@@ -475,7 +468,6 @@ func GetVersionObsListObject(jobName, parentDir string) ([]FileInfo, error) { |
|
|
|
FileName: fileName, |
|
|
|
Size: val.Size, |
|
|
|
IsDir: isDir, |
|
|
|
>>>>>>> origin/liuzx_trainjob |
|
|
|
ParenDir: nextParentDir, |
|
|
|
} |
|
|
|
fileInfos = append(fileInfos, fileInfo) |
|
|
|
@@ -514,14 +506,9 @@ func ObsGenMultiPartSignedUrl(uuid string, uploadId string, partNumber int, file |
|
|
|
|
|
|
|
func GetObsCreateSignedUrlByBucketAndKey(bucket, key string) (string, error) { |
|
|
|
input := &obs.CreateSignedUrlInput{} |
|
|
|
<<<<<<< HEAD |
|
|
|
input.Bucket = bucket |
|
|
|
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.Method = obs.HttpMethodGet |
|
|
|
comma := strings.LastIndex(key, "/") |
|
|
|
|