You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if you have 199/200 jobs done, this function will return 100 because round(99.5) is 100
Shouldn't this method use floor() here ? or maybe directly return a floating value ?
If you use it to display a progress bar, the progress bar could show 100% even if there is a lot of jobs left in the batch...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The rounding strategy used for batch progress is
round()
framework/src/Illuminate/Bus/Batch.php
Line 232 in f75e510
So if you have 199/200 jobs done, this function will return 100 because
round(99.5)
is100
Shouldn't this method use
floor()
here ? or maybe directly return a floating value ?If you use it to display a progress bar, the progress bar could show 100% even if there is a lot of jobs left in the batch...
Beta Was this translation helpful? Give feedback.
All reactions