This is different from the rate limit. For example, I have an email server that doesn't allow you to send too many emails sequentially, so you need to pause before sending the next one. So that way it would be very useful.
Currently I solved this problem by adding a sleep(5) at the end of the job's handle method, but it doesn't seem to be pleasant.
Hi,
I would like to make a suggestion to be able to add an interval time between jobs to run, this configuration could be a property of the worker.
for example:
php artisan queue:work --queue=emails --interval=5
the behavior would be as follows:
This is different from the rate limit. For example, I have an email server that doesn't allow you to send too many emails sequentially, so you need to pause before sending the next one. So that way it would be very useful.
Currently I solved this problem by adding a
sleep(5)
at the end of the job'shandle
method, but it doesn't seem to be pleasant.