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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jakeonrails
Copy link

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 <jakeonrails@gmail.com>
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).

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.

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.

1 participant