-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pending job count not correct on batch with failures allowed #1063
Comments
This is the expected behaviour. Pending jobs are one that haven't finished. In your case, these are the failed jobs. |
I tried to improve the UI here: #1064 |
Thanks for the feedback @themsaid. It makes sense that those failed jobs are in fact also pending jobs since they have not completed. That said I would expect that they are somewhere stored as being processed since they are not going to be handled by any worker from now on? Cannot seem to find this information from the batch itself though. I like your #1064 contribution @driesvints, much appreciated. @themsaid, @driesvints is there a way we could indicate that all jobs has been handled and no further processing will occur? It can be tricky to know when exactly the batch has no further jobs that will be processed - especially if you also use the "Retry Failed Jobs" feature, as the "Pending" jobs will consist of both jobs being retried and jobs that will no longer be retried. Maybe we should not remove the "Pending" badge as soon as there are "Failures" but instead show both badges? I have sketched the process below, which indicates that it can be tricky to know the meaning of "pending" jobs and determining if the batch has completed running (simply added a Process using retryNo jobs yet processed - 5 pending jobs that will be processedFirst job processed (success) - 4 pending jobs that will be processedSecond job processed (success) - 3 pending jobs that will be processedThird job processed (success) - 2 pending jobs that will be processedFourth job processed (failed) - 2 pending jobs but only one that will be processedFifth job processed (failed) - 2 pending jobs but none that will be processedRetry jobsNow clicking the "Retry Failed Jobs" button. Fourth job retried (failed) - 2 pending jobs but one that will be processedFifth job retried (failed) - 2 pending jobs but none that will be processed |
Hey @bilfeldt, I think that all looks good to be honest. It's probably best that if you want to improve something here that you attempt a PR. |
Description:
When using batches with failures allowed then the Batch information about pending jobs shown in Horizon is misleading.
Example (can be found in github repo below):
This batch should have a total of 5 jobs and 3 of them should eventually succeed (60%). Now the end result in Horizon shows 2 pending jobs + 2 failed jobs:
I think this is a bug since only jobs not marked as "failed" or "completed" should appear as pending (since they will be processed soon). This is also confirmed by no pending jobs appearing:
While there are in fact three completed jobs:
and two failed:
Steps To Reproduce:
A Github repository showcasing the error can be seen here: https://github.com/bilfeldt/bug-report
php artisan horizon
/batch
which will dispatch the batch of jobsThe text was updated successfully, but these errors were encountered: