From 58eed2dc7f06a86507477805e23e32b0d029293a Mon Sep 17 00:00:00 2001 From: Allan Brault Date: Mon, 26 Jan 2015 16:59:55 +0100 Subject: [PATCH] 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) --- Command/PopulateCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Command/PopulateCommand.php b/Command/PopulateCommand.php index ac37cab..3f24a7f 100644 --- a/Command/PopulateCommand.php +++ b/Command/PopulateCommand.php @@ -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);