uncap retries on main
parent
a6aad2820d
commit
47c7aa74d3
|
|
@ -121,7 +121,7 @@ func (e Entrypoint) String() string {
|
||||||
func runner(ctx context.Context, k string, foo func(context.Context) error) func() error {
|
func runner(ctx context.Context, k string, foo func(context.Context) error) func() error {
|
||||||
return func() error {
|
return func() error {
|
||||||
var err error
|
var err error
|
||||||
for i := 0; i < 3; i++ {
|
for {
|
||||||
err = foo(ctx)
|
err = foo(ctx)
|
||||||
if ctx.Err() == nil {
|
if ctx.Err() == nil {
|
||||||
log.Printf("%s failed; restarting: %v", k, err)
|
log.Printf("%s failed; restarting: %v", k, err)
|
||||||
|
|
@ -132,6 +132,5 @@ func runner(ctx context.Context, k string, foo func(context.Context) error) func
|
||||||
case <-time.After(time.Second):
|
case <-time.After(time.Second):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt.Errorf("failed 3 tries: %w", err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue