You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

asyncommitaitaskhandler.go 777 B

1234567891011121314151617181920212223242526272829
  1. package core
  2. import (
  3. "net/http"
  4. "github.com/zeromicro/go-zero/rest/httpx"
  5. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
  6. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
  7. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
  8. )
  9. // 异步提交智算任务
  10. func AsynCommitAiTaskHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  11. return func(w http.ResponseWriter, r *http.Request) {
  12. var req types.AsynCommitAiTaskReq
  13. if err := httpx.Parse(r, &req); err != nil {
  14. httpx.ErrorCtx(r.Context(), w, err)
  15. return
  16. }
  17. l := core.NewAsynCommitAiTaskLogic(r.Context(), svcCtx)
  18. resp, err := l.AsynCommitAiTask(&req)
  19. if err != nil {
  20. httpx.ErrorCtx(r.Context(), w, err)
  21. } else {
  22. httpx.OkJsonCtx(r.Context(), w, resp)
  23. }
  24. }
  25. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.