jobspec: default count of group to 1 if not specified

This commit is contained in:
Armon Dadgar 2015-09-20 14:36:37 -07:00
parent f30e783c8e
commit 0d9042808c
1 changed files with 5 additions and 0 deletions

View File

@ -178,6 +178,11 @@ func parseGroups(result *structs.Job, obj *hclobj.Object) error {
delete(m, "meta")
delete(m, "task")
// Default count to 1 if not specified
if _, ok := m["count"]; !ok {
m["count"] = 1
}
// Build the group with the basic decode
var g structs.TaskGroup
g.Name = n