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

Add docs about using string keys to create multiple limits per unit of time. #202

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

jakeonrails
Copy link
Contributor

Add docs about using string keys to create multiple limits per unit of time.

I was confused about implementing this type of behavior until I saw your comment in #149, explaining the use of strings for the key_suffix. Hopefully this doc will help other realize they don't need a proc to do this but that the key_suffix is required for having multiple limits.

I was simply doing this:

throttle: [
  { limit: 500, period: 1.minute },
  { limit: 18_000, period: 1.day }
]

This showed up in the UI on Sidekiq Admin as two separate throttles so it looked like it worked but it does not.

Add docs about using string keys to create multiple limits per unit of time

Signed-off-by: Jake Moffatt <[email protected]>
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.71%. Comparing base (a15db1b) to head (c65f387).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #202   +/-   ##
=======================================
  Coverage   98.71%   98.71%           
=======================================
  Files          19       19           
  Lines         466      466           
  Branches       77       77           
=======================================
  Hits          460      460           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@ixti ixti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ixti ixti merged commit eb2c0ee into ixti:main Jan 12, 2025
19 checks passed
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

Successfully merging this pull request may close these issues.

2 participants