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 committed Jun 12, 2024
1 parent 0e227a2 commit 0964910
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions internal/environment/template-environment-job.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ 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"
delay_function = "exponential"
}

task "default-task" {
Expand Down

0 comments on commit 0964910

Please sign in to comment.