I'm want to queue some jobs using Redis,so I made an Event and its Listener.
The Listener implements ShouldQueue. I deliberately throw exception to test whether it fails. By entering the the command php artisan queue:work --tries=3
it should try the job 3 times and if it can't be done, add it to failed-jobs right? but it doesn't do so. I tried using database driver but nothing changed.
One time I used php artisan queue:work --tries=3 --daemon
despite the fact that --daemon
is deprecated, and after 3 tries,the job was marked as failed - but when I stopped the command and ran it again, it didn't fail again.
why is this happening? Thanks in advance :)