|
|
|
@@ -325,24 +325,6 @@ func ModelList(ctx *context.APIContext) { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func deleteJobStorage(jobName string) error { |
|
|
|
//delete local |
|
|
|
localJobPath := setting.JobPath + jobName |
|
|
|
err := os.RemoveAll(localJobPath) |
|
|
|
if err != nil { |
|
|
|
log.Error("RemoveAll(%s) failed:%v", localJobPath, err) |
|
|
|
} |
|
|
|
|
|
|
|
//delete oss |
|
|
|
dirPath := setting.CodePathPrefix + jobName + "/" |
|
|
|
err = storage.ObsRemoveObject(setting.Bucket, dirPath) |
|
|
|
if err != nil { |
|
|
|
log.Error("ObsRemoveObject(%s) failed:%v", localJobPath, err) |
|
|
|
} |
|
|
|
|
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func GetModelArtsInferenceJob(ctx *context.APIContext) { |
|
|
|
var ( |
|
|
|
err error |
|
|
|
|