Retry Environment Recovery

This commit is contained in:
Maximilian Paß
2023-08-16 12:47:32 +02:00
committed by Sebastian Serth
parent 89c18ad45c
commit 73759f8a3c
6 changed files with 13 additions and 6 deletions

View File

@ -244,7 +244,7 @@ func (r *NomadJob) Destroy(reason DestroyReason) (err error) {
}
if err == nil && !errors.Is(reason, ErrOOMKilled) {
err = util.RetryExponential(time.Second, func() (err error) {
err = util.RetryExponential(func() (err error) {
if err = r.api.DeleteJob(r.ID()); err != nil {
err = fmt.Errorf("error deleting runner in Nomad: %w", err)
}