Skip to content

Commit

Permalink
Adjust Nomad restart and reschedule behavior
Browse files Browse the repository at this point in the history
to limit the number of reschedules as we cannot guarantee an error-free job definition.
We also set reasonable delays and intervals to increase the likelihood that one deployment has enough time, but there is no second deployment within the interval.
  • Loading branch information
mpass99 authored and MrSerth committed Jun 27, 2024
1 parent ead96f6 commit 8f819de
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions internal/environment/template-environment-job.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ job "template-0" {
weight = 100
}
restart {
delay = "0s"
attempts = 3
delay = "15s"
interval = "1h"
mode = "fail"
}
reschedule {
unlimited = true
attempts = 0
unlimited = false
attempts = 3
interval = "6h"
delay = "1m"
max_delay = "4m"
delay_function = "exponential"
}

task "default-task" {
Expand Down

0 comments on commit 8f819de

Please sign in to comment.