Closed hivokas closed 3 years ago
Encountered the same problem
The document said,
When using rate limiting, the number of attempts your job will need to run successfully can be hard to determine. Therefore, it is useful to combine rate limiting with time based attempts.
https://laravel.com/docs/7.x/queues#rate-limiting
Howerer I don't think it's a better solution. Amount job will cast lots of time, we are not sure when they will be done.
Suggest:
If Redis::funnel()/Redis::throttle
don't increment attempts, we can use the times
option effectively.
I ran into that problem too. I vote for requeue()
😄
Use retryUntil
and maxExceptions
. Check https://laravel.com/docs/8.x/queues#max-exceptions
When I use
Redis::funnel()
/Redis::throttle
and release the job in case the lock could not be obtained, I don't want the number of attempts to be incremented. If that's already possible, please let me know. If no, then what do you think about that?