Update PopulateCommand.php

in the case i have 110 objects, it was doing :
Populating abc/Index 90.9% (100/110)
Populating abc/index 181.8% (200/110)

now :
Populating abc/Index 90.9% (100/110)
Populating abc/index 100.0% (110/110)
This commit is contained in:
Allan Brault 2015-01-26 16:59:55 +01:00
parent d44525f6f3
commit 58eed2dc7f

View file

@ -130,8 +130,8 @@ class PopulateCommand extends ContainerAwareCommand
$current = 0;
return function ($increment, $totalObjects) use ($output, $index, $type, &$lastStep, &$current) {
if ($increment > $totalObjects) {
$increment = $totalObjects;
if ($current + $increment > $totalObjects) {
$increment = $totalObjects - $current;
}
$currentTime = microtime(true);