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

Multiple throttle options #149

Open
apetrov88 opened this issue Jun 8, 2023 · 3 comments
Open

Multiple throttle options #149

apetrov88 opened this issue Jun 8, 2023 · 3 comments
Labels

Comments

@apetrov88
Copy link

Is it possible to set multiple throttle option like:

5 per 1 minute
100 per 1 hour
1000 per 1 day

All of them for the same worker.

@ixti
Copy link
Owner

ixti commented Jun 8, 2023

You should be able to do something like:

sidekiq_throttled(
  threshold: [
    { limit: 5, period: 5.minutes, key_suffix: "minutely" },
    { limit: 100, period: 1.hour, key_suffix: "hourly" },
    { limit: 1000, period: 1.day, key_suffix: "daily" },
  ]
)

@apetrov88 apetrov88 reopened this Jul 18, 2023
@apetrov88
Copy link
Author

Does not seem to work for me. Can you confirm the settings above are correctly?

@ixti ixti added the question label Sep 4, 2023
@danishsatkut
Copy link

@apetrov88 What's your sidekiq and sidekiq-throttled version?

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

No branches or pull requests

3 participants