调度结构修改7

Former-commit-id: 6e473ef1eb67c606e31b1f1b2bf8d6f885ae12fe
This commit is contained in:
tzwang 2023-08-29 15:12:51 +08:00
parent 53f35bc6d5
commit b44a49556d
1 changed files with 11 additions and 0 deletions

View File

@ -54,6 +54,17 @@ func (s *scheduler) AssignAndSchedule() error {
return nil
}
// 标签匹配后未找到ParticipantIds
if len(s.participantIds) == 0 {
return errors.New("未找到匹配的ParticipantIds")
}
// ParticipantIds 返回唯一值
if len(s.participantIds) == 1 {
s.task.ParticipantId = s.participantIds[0]
return nil
}
//生成算法所需参数
task, providerList := s.genTaskAndProviders()