Orbit to support environments with revoked enroll secrets (#8056)
* Support environments with revoked enroll secrets * Add instructions on how to fix Orbit enroll * Rename to last_recorded_error * Add alternative instructions
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
// package retry has utilities to retry operations
|
||||
// Package retry has utilities to retry operations.
|
||||
package retry
|
||||
|
||||
import (
|
||||
@@ -22,7 +22,7 @@ func WithInterval(i time.Duration) Option {
|
||||
}
|
||||
|
||||
// WithMaxAttempts allows to specify a maximum number of attempts
|
||||
// before the doer gives up
|
||||
// before the doer gives up.
|
||||
func WithMaxAttempts(a int) Option {
|
||||
return func(c *config) {
|
||||
c.maxAttempts = a
|
||||
@@ -54,7 +54,7 @@ func Do(fn func() error, opts ...Option) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if cfg.maxAttempts != 0 && attempts >= cfg.maxAttempts {
|
||||
if cfg.maxAttempts != 0 && attempts > cfg.maxAttempts {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user