From d0140f07ca51e3e22f40ea17e90ec11cc0f7942b Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Tue, 26 Sep 2017 10:21:35 -0700 Subject: [PATCH] grace_period -> grace --- api/tasks.go | 2 +- jobspec/parse.go | 2 +- jobspec/test-fixtures/basic.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/tasks.go b/api/tasks.go index a3d10831e..3233c9963 100644 --- a/api/tasks.go +++ b/api/tasks.go @@ -83,7 +83,7 @@ func (r *RestartPolicy) Merge(rp *RestartPolicy) { // failing health checks. type CheckRestart struct { Limit int `mapstructure:"limit"` - Grace *time.Duration `mapstructure:"grace_period"` + Grace *time.Duration `mapstructure:"grace"` IgnoreWarnings bool `mapstructure:"ignore_warnings"` } diff --git a/jobspec/parse.go b/jobspec/parse.go index 61e5b9968..019809225 100644 --- a/jobspec/parse.go +++ b/jobspec/parse.go @@ -1062,7 +1062,7 @@ func parseChecks(service *api.Service, checkObjs *ast.ObjectList) error { func parseCheckRestart(cro *ast.ObjectItem) (*api.CheckRestart, error) { valid := []string{ "limit", - "grace_period", + "grace", "ignore_warnings", } diff --git a/jobspec/test-fixtures/basic.hcl b/jobspec/test-fixtures/basic.hcl index a9dab9e72..81480bc23 100644 --- a/jobspec/test-fixtures/basic.hcl +++ b/jobspec/test-fixtures/basic.hcl @@ -98,7 +98,7 @@ job "binstore-storagelocker" { check_restart { limit = 3 - grace_period = "10s" + grace = "10s" ignore_warnings = true } }