laravel-job-status
laravel-job-status copied to clipboard
Job status stays as 'queued' when dispatch fails
When dispatching a job fails because of a missing connection, a record remains in the jobs table with the status of queued
. This can be handled manually by wrapping each dispatch in a try...catch
block and updating the record manually, but ideally this case should be handled by the library.
The same is true when dispatching fails due to duplication via the ShouldBeUnique trait. If I execute my unique job several times, I get one job record in the database and several status records.
Hi @imTigger is this going to be fixed? @alexking Do you mind to share what's inside the catch that you handle the exception? What did you update to the record? I am experiencing the same issues. It's just so random and when it happens, it's everywhere.