diff --git a/console/SiteMapController.php b/console/SiteMapController.php index 63ecc5e..6731dc3 100755 --- a/console/SiteMapController.php +++ b/console/SiteMapController.php @@ -35,8 +35,7 @@ { return ProductVariant::find() ->with('lang') - ->with('product.lang') - ->batch(10000); + ->with('product.lang'); } @@ -160,7 +159,7 @@ $this->createRow($url, 0.8); } - foreach ($this->getVariants() as $rows) { + foreach ($this->getVariants()->batch(1000) as $rows) { foreach ($rows as $row) { if(!preg_match("@^[a-zA-Z\d]+$@i", $row->sku)) { continue; -- libgit2 0.21.4