Skip to content

Commit 363b923

Browse files
committed
retry updateTTL on all errors
1 parent 40c707b commit 363b923

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

client/allocrunner/taskrunner/script_check_hook.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package taskrunner
33
import (
44
"context"
55
"fmt"
6-
"strings"
76
"sync"
87
"time"
98

@@ -351,9 +350,8 @@ const (
351350
func (s *scriptCheck) updateTTL(ctx context.Context, id, msg, state string) error {
352351
for attempts := 0; ; attempts++ {
353352
err := s.agent.UpdateTTL(id, msg, state)
354-
if err == nil ||
355-
!strings.Contains(err.Error(), "does not have associated TTL") {
356-
return err
353+
if err == nil {
354+
return nil
357355
}
358356

359357
// Handle the retry case

0 commit comments

Comments
 (0)