Code Monkey home page Code Monkey logo

Comments (7)

driesvints avatar driesvints commented on June 12, 2024

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).

from horizon.

jasonmccreary avatar jasonmccreary commented on June 12, 2024

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.

from horizon.

driesvints avatar driesvints commented on June 12, 2024

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 👍

from horizon.

crynobone avatar crynobone commented on June 12, 2024
Screenshot 2023-09-05 at 7 47 17 PM

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%)

<div class="row mb-2">
<div class="col-md-2 text-muted">Total Jobs</div>
<div class="col">{{batch.totalJobs}}</div>
</div>
<div class="row mb-2">
<div class="col-md-2 text-muted">Pending Jobs</div>
<div class="col">{{batch.pendingJobs}}</div>
</div>
<div class="row mb-2">
<div class="col-md-2 text-muted">Failed Jobs</div>
<div class="col">{{batch.failedJobs}}</div>
</div>
<div class="row">
<div class="col-md-2 text-muted">Completed Jobs<br><small>(Including Failed)</small></div>
<div class="col">{{ (batch.totalJobs-batch.pendingJobs) }} ({{batch.progress}}%)</div>
</div>

from horizon.

crynobone avatar crynobone commented on June 12, 2024

Alternatively we should follow Illuminate\Bus\Batch conversion of "Processed Jobs" (totals - pendingJobs) and displayed it as Processed Jobs 324 (67%)

from horizon.

driesvints avatar driesvints commented on June 12, 2024

Right, good spot @crynobone. Sorry about that @jasonmccreary

from horizon.

jasonmccreary avatar jasonmccreary commented on June 12, 2024

@driesvints, no worries. Glad it got reopened.

from horizon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.