-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Labels
Description
- Laravel Version: 5.8.3
- PHP Version: 7.2
- Database Driver & Version: mysql
- Horizon: 3.0.3 (redis)
- Homestead
Description:
I notice that the jobs still running without finished.
For example:
- If assign
$tries
more than one time the job will still running more times or - If assign
$timeoutAt
to specific time and$tries
to one time, the job will still running more times untiltimeoutAt
time exceeded.
Steps To Reproduce:
I think the problem in markJobAsFailedIfAlreadyExceedsMaxAttempts
in Worker
:
if ($timeoutAt && Carbon::now()->getTimestamp() <= $timeoutAt) {
return;
}
if (! $timeoutAt && ($maxTries === 0 || $job->attempts() <= $maxTries)) {
return;
}
The check separately on timeoutAt
and maxTries
.
if check it together we will avoid this problem.