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.

deployInstance.go 843 B

123456789101112131415161718192021222324252627282930313233
  1. package updater
  2. import (
  3. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
  4. "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
  5. "net/http"
  6. "strconv"
  7. )
  8. //func UpdateDeployInstanceStatus(svc *svc.ServiceContext, list []*models.AiInferDeployInstance) {
  9. //
  10. //}
  11. func UpdateDeployInstanceStatus(svc *svc.ServiceContext, instance *models.AiInferDeployInstance) {
  12. amap, found := svc.Scheduler.AiService.InferenceAdapterMap[strconv.FormatInt(instance.AdapterId, 10)]
  13. if !found {
  14. return
  15. }
  16. cmap, found := amap[strconv.FormatInt(instance.ClusterId, 10)]
  17. if !found {
  18. return
  19. }
  20. h := http.Request{}
  21. ins, err := cmap.GetInferDeployInstance(h.Context(), instance.InstanceId)
  22. if err != nil {
  23. return
  24. }
  25. instance.Status = ins.Status
  26. err = svc.Scheduler.AiStorages.UpdateInferDeployInstance(instance)
  27. if err != nil {
  28. return
  29. }
  30. }

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.