Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Migrate to new controller-runtime wait
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontes11 committed Oct 10, 2023
1 parent a62b295 commit be7d5cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/handler/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ func (r *Recovery) Delete(w http.ResponseWriter, req *http.Request) {
}

func (r *Recovery) pollUntilRecovered(ctx context.Context) (*galera.Bootstrap, error) {
// TODO: bump apimachinery and migrate to PollUntilContextTimeout.
// See: https://pkg.go.dev/k8s.io/[email protected]/pkg/util/wait#PollUntilContextTimeout
var bootstrap *galera.Bootstrap
err := wait.PollImmediateUntilWithContext(ctx, 1*time.Second, func(context.Context) (bool, error) {
err := wait.PollUntilContextCancel(ctx, 1*time.Second, true, func(context.Context) (bool, error) {
b, err := r.recover()
if err != nil {
r.logger.Error(err, "error recovering galera from recovery log")
Expand Down

0 comments on commit be7d5cc

Please sign in to comment.