hpc cancel job

Former-commit-id: 27120c4506282c119e59c154f48cd9a303874b63
This commit is contained in:
zhangwei 2024-11-01 15:48:47 +08:00
parent 87ce5097b6
commit 38357fcace
1 changed files with 2 additions and 5 deletions

View File

@ -1,6 +1,7 @@
package hpc
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
@ -19,10 +20,6 @@ func CancelJobHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
l := hpc.NewCancelJobLogic(r.Context(), svcCtx)
err := l.CancelJob(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.Ok(w)
}
result.HttpResult(r, w, nil, err)
}
}