From 189c833f5da3e8c8097ea58cc4f4fda261a29895 Mon Sep 17 00:00:00 2001 From: tzwang Date: Thu, 25 Apr 2024 16:03:13 +0800 Subject: [PATCH] generate getJobLog api Former-commit-id: cf3cfd9b6f4ced4a41800863238490a797964c65 --- api/internal/handler/routes.go | 5 +++++ api/internal/types/types.go | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/api/internal/handler/routes.go b/api/internal/handler/routes.go index a68efc58..0138989a 100644 --- a/api/internal/handler/routes.go +++ b/api/internal/handler/routes.go @@ -1145,6 +1145,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Path: "/schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset", Handler: schedule.ScheduleGetAlgorithmsHandler(serverCtx), }, + { + Method: http.MethodGet, + Path: "/schedule/ai/getJobLog/:taskId/:instanceNum", + Handler: schedule.ScheduleGetAiJobLogLogHandler(serverCtx), + }, { Method: http.MethodPost, Path: "/schedule/submit", diff --git a/api/internal/types/types.go b/api/internal/types/types.go index 59dd185d..53285b9b 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -5535,6 +5535,15 @@ type AiAlgorithmsResp struct { Algorithms []string `json:"algorithms"` } +type AiJobLogReq struct { + TaskId string `path:"taskId"` + InstanceNum string `path:"instanceNum"` +} + +type AiJobLogResp struct { + Log string `json:"log"` +} + type CreateAlertRuleReq struct { CLusterId string `json:"clusterId"` ClusterName string `json:"clusterName"`