1
0
mirror of https://github.com/rancher/norman.git synced 2025-07-31 14:54:38 +00:00

replace deprecated wait.Poll with wait.PollUntilContextTimeout

This commit is contained in:
vardhaman22 2023-08-31 12:19:28 +05:30
parent df267d4b7b
commit 32b73ab511

View File

@ -135,7 +135,7 @@ func (f *Factory) waitCRD(ctx context.Context, apiClient clientset.Interface, cr
defer logrus.Infof("Done waiting for CRD %s to become available", crdName) defer logrus.Infof("Done waiting for CRD %s to become available", crdName)
first := true first := true
return wait.Poll(500*time.Millisecond, 60*time.Second, func() (bool, error) { return wait.PollUntilContextTimeout(ctx, 500*time.Millisecond, 60*time.Second, false, func(ctx context.Context) (bool, error) {
if !first { if !first {
logrus.Infof("Waiting for CRD %s to become available", crdName) logrus.Infof("Waiting for CRD %s to become available", crdName)
} }