1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-31 14:51:57 +00:00

Fixes to adapt to 1.10.5

This commit is contained in:
Alena Prokharchyk
2018-07-11 16:42:25 -07:00
parent d7ac071df7
commit 26d279bce1
3 changed files with 5 additions and 4 deletions

View File

@@ -7,11 +7,11 @@ import (
"sync"
"time"
"github.com/juju/ratelimit"
errors2 "github.com/pkg/errors"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/types"
"github.com/sirupsen/logrus"
"golang.org/x/time/rate"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -69,7 +69,7 @@ func NewGenericController(name string, genericClient Backend) GenericController
rl := workqueue.NewMaxOfRateLimiter(
workqueue.NewItemExponentialFailureRateLimiter(500*time.Millisecond, 1000*time.Second),
// 10 qps, 100 bucket size. This is only for retry speed and its only the overall factor (not per item)
&workqueue.BucketRateLimiter{Bucket: ratelimit.NewBucketWithRate(float64(10), int64(100))},
&workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)},
)
return &genericController{