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 8a3181e6d1
commit 9818912e68

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