Allow setting a perSecond Rate Limiter (for queue jobs) #47493
Unanswered
pniel-cohen
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following: https://laravel.com/docs/10.x/queues#rate-limiting.
Currently, when there's a need to define a rate limiter for a job, it doesn't support a
perSecond()
limit.I know that technically it's possible to work-around it by throttling or using a custom middleware, etc.. but I think it could be handy and save time in some cases.
e.g., if a job has to call an external API that has a limit of "1 request per second", setting a rate-limiter of "60 per minute" will still allow more than 1 request per second, as opposed to setting it to "1 per 2 seconds", for example.
Beta Was this translation helpful? Give feedback.
All reactions