Validate task group count on system scheduler

This commit is contained in:
Alex Dadgar
2015-10-16 14:15:01 -07:00
parent 7feb5f1978
commit a0d3eb7792

View File

@@ -829,6 +829,12 @@ func (j *Job) Validate() error {
} else {
taskGroups[tg.Name] = idx
}
if j.Type == "system" && tg.Count != 1 {
mErr.Errors = append(mErr.Errors,
fmt.Errorf("Job task group %d has count %d. Only count of 1 is supported with system scheduler",
idx+1, tg.Count))
}
}
// Validate the task group