-
Notifications
You must be signed in to change notification settings - Fork 657
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 number seems incorrect #1311
Comments
Hey @jasonmccreary. I believe these numbers are correct. This view is just a direct representation of the values of a batch in Laravel: https://github.com/laravel/framework/blob/2e3d23fc89c5c9e9841962d5c9bf0e3881a81929/src/Illuminate/Bus/Batch.php#L445-L457 There's pending jobs which are basically the failed jobs which still need to run, there's completed jobs and then there's a total number of jobs (completed + pending/failed). |
Thanks for the explanation. I still wonder if the wording could be adjusted as "pending" to me means needs to be run. I see how "failed" falls into that category though. No biggie. |
I think it's best we just use the wording as is on the batch array personally. You can always try a PR to see if Taylor would accept it 👍 |
Total Job value is in fact incorrect, at the moment it calculated from (totals - pendingJobs), when it should show Completed Jobs (including failed) 484 (100%) horizon/resources/js/screens/batches/preview.vue Lines 143 to 158 in bea664a
|
Alternatively we should follow |
fixes #1311 Signed-off-by: Mior Muhammad Zaki <[email protected]>
Right, good spot @crynobone. Sorry about that @jasonmccreary |
…#1315) * Use available `batch.processedJobs` value from `Illuminate\Bus\Batch` fixes #1311 Signed-off-by: Mior Muhammad Zaki <[email protected]> * Compile Assets --------- Signed-off-by: Mior Muhammad Zaki <[email protected]> Co-authored-by: crynobone <[email protected]>
@driesvints, no worries. Glad it got reopened. |
Horizon Version
5.19.1
Laravel Version
10.19.0
PHP Version
8.2.9
Redis Driver
Predis
Redis Version
1.1.10
Database Driver & Version
No response
Description
It appears the "Pending Jobs" number may be incorrect or misleading when there are failed jobs. This batch is complete and 160 did fail. However, no more are pending.
I would expect this number to be 0 since the batch is complete. Or, if it is to indicate the number of "Incomplete Jobs", then maybe that should have a separate title. Depending on the direction, the "Completed Jobs" and its subtitle might need to be adjusted as currently I would expect it to be
484
.I see the same thing for all my recent batched jobs with failures - the "Pending Jobs" and "Failed Jobs" numbers are the same.
Steps To Reproduce
Run a batched job with some failures. You should see "Pending Jobs" and "Failed Jobs" are the same number.
The text was updated successfully, but these errors were encountered: