Skip to content

Fix stuck processing jobs when using Laravel's $tries feature - #68

Open
morrislaptop wants to merge 1 commit into
storviaio:mainfrom
morrislaptop:fix-processing-jobs
Open

Fix stuck processing jobs when using Laravel's $tries feature#68
morrislaptop wants to merge 1 commit into
storviaio:mainfrom
morrislaptop:fix-processing-jobs

Conversation

@morrislaptop

Copy link
Copy Markdown

If a job has $tries set, Laravel will only fire the JobFailed event once the job tries have been exceeded.

Vantage creates a new record for each job attempt but only 1 record is updated upon failure.

  • This change ensures the matching attempt record is updated with the stack etc (I don't know of a way to hook into each job attempt failure event)
  • Also marks all previous attempts at the job as failed

This avoids lots of processing jobs being stuck in the database.

- Update RecordJobFailure listener to mark previous job attempts as failed.
- Add tests to verify that both the latest and previous job attempts are updated correctly upon failure.
@morrislaptop morrislaptop changed the title Mark previous jobs as failed Fix stuck processing jobs when using Laravel's $tries feature May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant