|
|
|
@@ -329,9 +329,14 @@ func NotebookManage(ctx *context.Context) { |
|
|
|
var resultCode = "0" |
|
|
|
var errorMsg = "" |
|
|
|
var status = "" |
|
|
|
task, err := models.GetCloudbrainByID(ID) |
|
|
|
if err != nil { |
|
|
|
log.Error("get task(%s) failed:%v", task.JobName, err.Error(), ctx.Data["MsgID"]) |
|
|
|
resultCode = "-1" |
|
|
|
errorMsg = "system error" |
|
|
|
} |
|
|
|
|
|
|
|
for { |
|
|
|
task := ctx.Cloudbrain |
|
|
|
|
|
|
|
if action == models.ActionStop { |
|
|
|
if task.Status != string(models.ModelArtsRunning) { |
|
|
|
@@ -438,7 +443,7 @@ func NotebookDel(ctx *context.Context) { |
|
|
|
_, err := modelarts.DelNotebook2(task.JobID) |
|
|
|
if err != nil { |
|
|
|
log.Error("DelNotebook2(%s) failed:%v", task.JobName, err.Error()) |
|
|
|
if strings.Contains(err.Error(), modelarts.NotebookNotFound) || strings.Contains(err.Error(), modelarts.NotebookNoPermission) || strings.Contains(err.Error(), modelarts.NotebookInvalid){ |
|
|
|
if strings.Contains(err.Error(), modelarts.NotebookNotFound) || strings.Contains(err.Error(), modelarts.NotebookNoPermission) || strings.Contains(err.Error(), modelarts.NotebookInvalid) { |
|
|
|
log.Info("old notebook version") |
|
|
|
} else { |
|
|
|
ctx.RenderWithErr(err.Error(), tplDebugJobIndex, nil) |
|
|
|
|