jobspec: add max_client_disconnect to hcl1 group parsing. (#12568)
This commit is contained in:
parent
3f871973f9
commit
5a67866ae1
|
@ -57,6 +57,7 @@ func parseGroups(result *api.Job, list *ast.ObjectList) error {
|
|||
"volume",
|
||||
"scaling",
|
||||
"stop_after_client_disconnect",
|
||||
"max_client_disconnect",
|
||||
}
|
||||
if err := checkHCLKeys(listVal, valid); err != nil {
|
||||
return multierror.Prefix(err, fmt.Sprintf("'%s' ->", n))
|
||||
|
|
|
@ -201,6 +201,7 @@ func TestParse(t *testing.T) {
|
|||
},
|
||||
},
|
||||
StopAfterClientDisconnect: timeToPtr(120 * time.Second),
|
||||
MaxClientDisconnect: timeToPtr(120 * time.Hour),
|
||||
ReschedulePolicy: &api.ReschedulePolicy{
|
||||
Interval: timeToPtr(12 * time.Hour),
|
||||
Attempts: intToPtr(5),
|
||||
|
|
|
@ -158,6 +158,7 @@ job "binstore-storagelocker" {
|
|||
}
|
||||
|
||||
stop_after_client_disconnect = "120s"
|
||||
max_client_disconnect = "120h"
|
||||
|
||||
task "binstore" {
|
||||
driver = "docker"
|
||||
|
|
Loading…
Reference in New Issue