From 9c2db2aebad450b59f252df7b63189c3c57cfe3d Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 13 Dec 2022 09:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/grampus.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index 3e693a7b1..f471f0c4d 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -1675,7 +1675,13 @@ func GrampusNotebookRestart(ctx *context.Context) { res, err := grampus.RestartNotebookJob(task.JobID) if err != nil { log.Error("ManageNotebook2(%s) failed:%v", task.DisplayJobName, err.Error(), ctx.Data["MsgID"]) - errorMsg = err.Error() + errorMsg = ctx.Tr("repo.debug_again_fail") + break + } + + if res.GrampusResult.ErrorCode != 0 || res.NewId == "" { + log.Error("ManageNotebook2 failed:" + res.GrampusResult.ErrorMsg) + errorMsg = ctx.Tr("repo.debug_again_fail") break } @@ -1690,6 +1696,8 @@ func GrampusNotebookRestart(ctx *context.Context) { Type: task.Type, Uuid: task.Uuid, Image: task.Image, + BranchName: task.BranchName, + DatasetName: task.DatasetName, ComputeResource: task.ComputeResource, Description: task.Description, CreatedUnix: createTime,