From cb7325393f2b4d4ecd0ccef08a4cfcaf58ed405d Mon Sep 17 00:00:00 2001 From: tzwang Date: Thu, 26 Jun 2025 10:33:19 +0800 Subject: [PATCH] update TaskLog --- .../handler/schedule/schedulegetaijoblogloghandler.go | 9 +++------ internal/logic/core/taskdetailslogic.go | 4 ++++ internal/storeLink/openi.go | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/internal/handler/schedule/schedulegetaijoblogloghandler.go b/internal/handler/schedule/schedulegetaijoblogloghandler.go index e9eb00997..bc9c7c97e 100644 --- a/internal/handler/schedule/schedulegetaijoblogloghandler.go +++ b/internal/handler/schedule/schedulegetaijoblogloghandler.go @@ -7,22 +7,19 @@ import ( "gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/schedule" "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc" "gitlink.org.cn/JointCloud/pcm-coordinator/internal/types" + "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result" ) func ScheduleGetAiJobLogLogHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.AiJobLogReq if err := httpx.Parse(r, &req); err != nil { - httpx.ErrorCtx(r.Context(), w, err) + result.ParamErrorResult(r, w, err) return } l := schedule.NewScheduleGetAiJobLogLogLogic(r.Context(), svcCtx) resp, err := l.ScheduleGetAiJobLogLog(&req) - if err != nil { - httpx.ErrorCtx(r.Context(), w, err) - } else { - httpx.OkJsonCtx(r.Context(), w, resp) - } + result.HttpResult(r, w, resp, err) } } diff --git a/internal/logic/core/taskdetailslogic.go b/internal/logic/core/taskdetailslogic.go index 2c1d03b5c..f40f8e9d4 100644 --- a/internal/logic/core/taskdetailslogic.go +++ b/internal/logic/core/taskdetailslogic.go @@ -70,3 +70,7 @@ func (l *TaskDetailsLogic) TaskDetails(req *types.FId) (resp *types.TaskDetailsR resp.SubTaskInfos = subList return } + +func (l *TaskDetailsLogic) deployTaskDetail() { + //l.svcCtx.Scheduler.AiStorages.GetInferDeployInstanceById() +} diff --git a/internal/storeLink/openi.go b/internal/storeLink/openi.go index 02868367e..7ab1a4540 100644 --- a/internal/storeLink/openi.go +++ b/internal/storeLink/openi.go @@ -671,7 +671,7 @@ func (o *OpenI) GetTrainingTaskLog(ctx context.Context, taskId string, instanceN Send() if err != nil { - return "", errors.New("failed to invoke taskDetails") + return "", err } if resp.Data == "" {