update limiter buffer

This commit is contained in:
Balakrishnan Balasubramanian 2022-06-12 18:17:05 -04:00
parent 7029ff702e
commit 7b07cf2c7b

View File

@ -71,9 +71,9 @@ func NewTelegramSender(transport http.RoundTripper, authToken string) TelegramSe
client: &http.Client{Transport: transport}, client: &http.Client{Transport: transport},
authToken: authToken, authToken: authToken,
// 20 requests per min with some buffer // 20 requests per min with some buffer
rateLimiterPerMin: limiter.NewLimiter(65*time.Second, 20), rateLimiterPerMin: limiter.NewLimiter((60+15)*time.Second, 20),
// 1 msg per sec with some buffer // 1 msg per sec with some buffer
rateLimiterPerSec: limiter.NewLimiter(1050*time.Millisecond, 1), rateLimiterPerSec: limiter.NewLimiter(1100*time.Millisecond, 1),
} }
} }