-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
Hi,
I was trying to get this gem working and ran into quite a time-consuming snag... if you use a lambda for your limit definition and it doesn't accept parameters (or accepts a different number of parameters), throttling will fail silently due to the blanket rescue here: https://github.com/ixti/sidekiq-throttled/blob/main/lib/sidekiq/throttled.rb#L92.
Example that will fail silently if the job has any parameters:
sidekiq_throttle(
threshold: {
limit: -> { FeatureService.feature_flag_for_throttling },
period: 1.second
})I wanted to see if there was a good reason for this rescue or if it could be removed? Happy to submit a PR if the latter. I generally find it bad practice to swallow errors like this since in my case it was masking a pretty simple configuration problem.
myers
Metadata
Metadata
Assignees
Labels
No labels