laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 419 forks source link

Job's attempts back to 1 on failed() method #942

Closed webkod3r closed 5 years ago

webkod3r commented 5 years ago

Description:

When dealing with failed database jobs due to an exception or max attempts reached, the $this->attempts() method evaluates to 1 instead of $tries + 1.

Steps To Reproduce:

Create a Job and set the public $tries = x. After the job gets inserted into the DB change the attempts column value to x (your max attempts allowed). Once everything is set-up, run the artisan command to process the job:

php artisan queue:work database --once

The execution will go directly to the failed() inside your job and $this->attempts() will evaluate 1

driesvints commented 5 years ago

Hey there,

Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? We'll help you out and re-open this issue if so.

Thanks!