Merge pull request 'hpc cancel job' (#333) from zhangweiii/pcm-coordinator:master into master
Former-commit-id: 017730851c0e5642b0cb4b7f05d8a5656eab16c8
This commit is contained in:
commit
ba8469deef
|
@ -1,6 +1,7 @@
|
||||||
package hpc
|
package hpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
@ -19,10 +20,6 @@ func CancelJobHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|
||||||
l := hpc.NewCancelJobLogic(r.Context(), svcCtx)
|
l := hpc.NewCancelJobLogic(r.Context(), svcCtx)
|
||||||
err := l.CancelJob(&req)
|
err := l.CancelJob(&req)
|
||||||
if err != nil {
|
result.HttpResult(r, w, nil, err)
|
||||||
httpx.ErrorCtx(r.Context(), w, err)
|
|
||||||
} else {
|
|
||||||
httpx.Ok(w)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue