|
@@ -307,7 +307,7 @@ func NotebookDebug2(ctx *context.Context) { |
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) |
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ctx.Redirect(result.Url) |
|
|
ctx.Redirect(result.Url) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -387,7 +387,7 @@ func NotebookManage(ctx *context.Context) { |
|
|
log.Error("ManageNotebook2(%s) failed:%v", task.JobName, err.Error(), ctx.Data["MsgID"]) |
|
|
log.Error("ManageNotebook2(%s) failed:%v", task.JobName, err.Error(), ctx.Data["MsgID"]) |
|
|
resultCode = "-1" |
|
|
resultCode = "-1" |
|
|
errorMsg = err.Error() |
|
|
errorMsg = err.Error() |
|
|
if strings.Contains(err.Error(), "ModelArts.6404") { |
|
|
|
|
|
|
|
|
if strings.Contains(err.Error(), modelarts.NotebookNotFound) { |
|
|
errorMsg = "the job's version is too old and can not be restarted" |
|
|
errorMsg = "the job's version is too old and can not be restarted" |
|
|
} |
|
|
} |
|
|
break |
|
|
break |
|
@@ -428,8 +428,12 @@ func NotebookDel(ctx *context.Context) { |
|
|
_, err := modelarts.DelNotebook2(jobID) |
|
|
_, err := modelarts.DelNotebook2(jobID) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
log.Error("DelNotebook2(%s) failed:%v", task.JobName, err.Error()) |
|
|
log.Error("DelNotebook2(%s) failed:%v", task.JobName, err.Error()) |
|
|
ctx.ServerError("DelNotebook2 failed", err) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
if strings.Contains(err.Error(), modelarts.NotebookNotFound) { |
|
|
|
|
|
log.Info("old notebook version") |
|
|
|
|
|
} else { |
|
|
|
|
|
ctx.ServerError("DelNotebook2 failed", err) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
err = models.DeleteJob(task) |
|
|
err = models.DeleteJob(task) |
|
|