Skip to content

Commit c8f3db9

Browse files
committed
Add some comments
1 parent 6c7f47b commit c8f3db9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/sync/syncer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ func shouldWaitAndRetry(ctx context.Context, annos annotations.Annotations, err
9696
attempts++
9797
l := ctxzap.Extract(ctx)
9898

99+
// use lineal time by default
99100
var wait time.Duration = time.Duration(attempts) * time.Second
100101
rlData := &v2.RateLimitDescription{}
101102
if annos != nil {
102103
ok, err := annos.Pick(rlData)
103104
if ok && err == nil {
105+
// or use time provided in the annotations
104106
wait = time.Until(rlData.ResetAt.AsTime())
105107
}
106108
}

0 commit comments

Comments
 (0)