-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Limiter does not work #35
Comments
@bitliner (i know this is not your primary concern, but I also want to use this package and am trying to troubleshoot) why does your code say
wouldn't this be 4 per second? also, your comment points to second also, I cannot replicate your issue with static here is my test:
for which i get the output:
|
I am trying to limit a call to an external API to 5 queries per second and 200 queries per minute. My code is like below:
here is some output of a test with 1000 queries (I have the test stop when it detects the service has cut us off due to exceeding rate limits):
|
perhaps this would be a better approach for my project? https://github.com/eventEmitter/request-rate-limiter will update |
I have this same problem. It's like the whole purpose of the library isn't working. |
This library is still not working for me. This simple test fails and my
|
@josh-mercarto that test looks like you are expecting the callback to have been synchronously executed before moving to the next line? That won’t happen. |
Hello, following #68 I'm using this lib on my website which is making rate limited etsy api call (creharmony/node-etsy-client#19) ==> cf draft PR #70 What I encounter during my tests:
I dont see a fix for this 2017 issue so I'm less and less confident in this library. Any hint would be greatly appreciated |
My code is as following:
The limit is exceeded.
Indeed, the console.log in the schedule() method prints:
and as you can see, in the second
1487770297
there are 7 requests (instead of 5), and number of tokens to remove is constant.The text was updated successfully, but these errors were encountered: