mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
jobspec: default count of group to 1 if not specified
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user