-
Notifications
You must be signed in to change notification settings - Fork 16
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
Allow passing of custom MS for per #19
Conversation
Can you add a test for this? |
Sure! I'm honestly more of an Elixir guy and I'm not sure if I'm running the suite correctly...
|
Did you run them with |
@facundoolano Thanks! That worked. Test added. |
src/throttle_time.erl
Outdated
@@ -14,7 +14,9 @@ interval(per_hour) -> | |||
interval(per_minute) -> | |||
1000 * 60; | |||
interval(per_second) -> | |||
1000. | |||
1000; | |||
interval(CustomMs) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a when is_integer(CustomMs)
here, so we still break on malformed input?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Thanks, added one last minor comment. |
I'd like to be able to determine my own interval. I have a case where I need to enforce 1 request every 10 seconds.
Thanks!