I'm testing my code of dispatching jobs to queue in Laravel 5.5. If I understand the concept correctly, the retry_after
value in the config contains the number of seconds the queue worker waits until it executes the code again if previous execution of the job was not completed successful. The default value is 60 seconds. I've added abort(403)
to my code to throw error in order to test the behavior. I tried to run it with two queue drivers consequently: database
and beanstalkd
, in both cases the queue worker made 5 attempts without waiting for 60 seconds between the attempts:
[2017-11-25 13:53:06] Processing: App\Jobs\ProcessOrder
[2017-11-25 13:53:06] Processing: App\Jobs\ProcessOrder
[2017-11-25 13:53:06] Processing: App\Jobs\ProcessOrder
[2017-11-25 13:53:06] Processing: App\Jobs\ProcessOrder
[2017-11-25 13:53:06] Processing: App\Jobs\ProcessOrder
[2017-11-25 13:53:07] Failed: App\Jobs\ProcessOrder
Why doesn't the queue worker wait before running another try?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2Bble4R
via IFTTT
Aucun commentaire:
Enregistrer un commentaire