feat: set one minute delay before trying with the new rate limiter
This commit is contained in:
parent
c0914820c0
commit
8e57f7f5ef
@ -22,7 +22,7 @@ var (
|
||||
limiterTimeout time.Duration = time.Second / 20
|
||||
limiterMaxTimeout time.Duration = time.Second
|
||||
limiterBurst int = 1
|
||||
limiterUpdateDelay time.Duration = time.Second * 10
|
||||
limiterUpdateDelay time.Duration = time.Minute
|
||||
|
||||
Limiter = rate.NewLimiter(rate.Every(limiterTimeout), limiterBurst)
|
||||
)
|
||||
@ -37,6 +37,7 @@ func lowerLimit() {
|
||||
time.Now().Add(limiterUpdateDelay),
|
||||
rate.Every(limiterTimeout),
|
||||
)
|
||||
log.Info().Msgf("wait %v", limiterUpdateDelay)
|
||||
time.Sleep(limiterUpdateDelay)
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ var (
|
||||
limiterTimeout time.Duration = time.Second / 20
|
||||
limiterMaxTimeout time.Duration = time.Second
|
||||
limiterBurst int = 1
|
||||
limiterUpdateDelay time.Duration = time.Second * 10
|
||||
limiterUpdateDelay time.Duration = time.Minute
|
||||
|
||||
Limiter = rate.NewLimiter(rate.Every(limiterTimeout), limiterBurst)
|
||||
)
|
||||
@ -34,6 +34,7 @@ func lowerLimit() {
|
||||
time.Now().Add(limiterUpdateDelay),
|
||||
rate.Every(limiterTimeout),
|
||||
)
|
||||
log.Info().Msgf("wait %v", limiterUpdateDelay)
|
||||
time.Sleep(limiterUpdateDelay)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user