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.

aiScheduler.go 814 B

12345678910111213141516171819202122232425262728293031
  1. package scheduler
  2. import (
  3. "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/algo"
  4. "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types"
  5. "gitlink.org.cn/jcce-pcm/pcm-coordinator/model"
  6. "gitlink.org.cn/jcce-pcm/utils/tool"
  7. )
  8. type aiScheduler struct {
  9. yamlString string
  10. }
  11. func NewAiScheduler(val string) *aiScheduler {
  12. return &aiScheduler{yamlString: val}
  13. }
  14. func (cs *aiScheduler) getNewStructForDb(task *types.TaskInfo, participantIds []int64) (interface{}, error) {
  15. ai := model.Ai{
  16. ParticipantId: participantIds[0],
  17. TaskId: task.TaskId,
  18. Status: "Saved",
  19. YamlString: cs.yamlString,
  20. }
  21. tool.Convert(task.Metadata, &ai)
  22. return ai, nil
  23. }
  24. func (cs *aiScheduler) pickOptimalStrategy(task *algo.Task, providers ...*algo.Provider) (*algo.Task, error) {
  25. return nil, nil
  26. }

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.