Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to make 1 request every 2 seconds? #50

Closed
abhsrivastava opened this issue Apr 25, 2023 · 1 comment
Closed

Is it possible to make 1 request every 2 seconds? #50

abhsrivastava opened this issue Apr 25, 2023 · 1 comment

Comments

@abhsrivastava
Copy link

I am using the simple implementation RateLimiter and I am using the lowest value of 1 (1 request / sec) but I still get 500 errors from the server which I am calling. so I wonder if its possible to further reduce the number of calls say 1 every 2 seconds?

@OlliV
Copy link
Collaborator

OlliV commented Jun 5, 2023

If I recall correctly the following would do what you are asking:

RateLimit(1, {
  timeUnit = 2000,
  uniformDistribution = false,
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants