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

Sidekiq::Limiter.unlimited does not comply with signature of other limiters #6301

Closed
Awem opened this issue May 20, 2024 · 0 comments
Closed

Comments

@Awem
Copy link

Awem commented May 20, 2024

Sidekiq / Pro / Enterprise version(s): sidekiq-ent (7.2.2)

The "Unlimited" rate limiter is supposed to be usable as a drop-in replacement for the other limiters (see https://github.com/sidekiq/sidekiq/wiki/Ent-Rate-Limiting). However, that won't work for cases where the limiters uses arguments or block variables for within_limit. E.g. limiter.within_limit(estimate: 1) {|handle| ...}

If limiter is Sidekiq::Limiter.unlimited it does not accept arguments for within_limit and does not yield handle. It should be adapted to accept any args and yield stub handles.

@mperham mperham closed this as completed May 20, 2024
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

No branches or pull requests

1 participant