mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
Change the default mode for client side restarts to fail from delay
This commit is contained in:
@@ -2514,13 +2514,13 @@ var (
|
||||
Delay: 15 * time.Second,
|
||||
Attempts: 2,
|
||||
Interval: 1 * time.Minute,
|
||||
Mode: RestartPolicyModeDelay,
|
||||
Mode: RestartPolicyModeFail,
|
||||
}
|
||||
defaultBatchJobRestartPolicy = RestartPolicy{
|
||||
Delay: 15 * time.Second,
|
||||
Attempts: 15,
|
||||
Interval: 7 * 24 * time.Hour,
|
||||
Mode: RestartPolicyModeDelay,
|
||||
Mode: RestartPolicyModeFail,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ description: |-
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The `restart` stanza configures a group's behavior on task failure.
|
||||
The `restart` stanza configures a group's behavior on task failure. Restarts
|
||||
happen on the client that is running the task.
|
||||
|
||||
```hcl
|
||||
job "docs" {
|
||||
@@ -62,7 +63,7 @@ defaults by job type:
|
||||
attempts = 15
|
||||
delay = "15s"
|
||||
interval = "168h"
|
||||
mode = "delay"
|
||||
mode = "fail"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -73,7 +74,7 @@ defaults by job type:
|
||||
interval = "1m"
|
||||
attempts = 2
|
||||
delay = "15s"
|
||||
mode = "delay"
|
||||
mode = "fail"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user