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:
parent
df267d4b7b
commit
32b73ab511
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user