aimeos / ai-controller-jobs

Aimeos e-commerce job controllers
https://aimeos.org
GNU Lesser General Public License v3.0
28 stars 17 forks source link

Addendum to Slicing issue in sitemap export #14

Closed s-diez closed 5 years ago

s-diez commented 5 years ago

Hi thank you for fixing the issue with the export file generation in the sitemaps. The algorithm you changed to query the items and add them to the export files is used in other export controllers too. I did not test it but I would expect, if you set 'controller/jobs/product/export/max-items' to 5 in https://github.com/aimeos/ai-controller-jobs/blob/master/controller/jobs/tests/Controller/Jobs/Product/Export/StandardTest.php#L53, as is the case in https://github.com/aimeos/ai-controller-jobs/blob/master/controller/jobs/tests/Controller/Jobs/Product/Export/Sitemap/StandardTest.php#L52, the same empty file would be generated. I suspect all export jobs use the same algorithm and need to be updated.

aimeos commented 5 years ago

That shouldn't be the case any more even if max-items === max-query due to the $free < $count and $count >= $search->getSliceSize() checks. All exports (catalog, product, product sitemap) have been updated and use the new algorithm.

s-diez commented 5 years ago

All exports (catalog, product, product sitemap) have been updated and use the new algorithm.

Thats what I mean. Am I missing something? https://github.com/aimeos/ai-controller-jobs/blob/master/controller/jobs/src/Controller/Jobs/Product/Export/Standard.php#L302 does not use the new algorithm compared to https://github.com/aimeos/ai-controller-jobs/blob/master/controller/jobs/src/Controller/Jobs/Product/Export/Sitemap/Standard.php#L368.

aimeos commented 5 years ago

You are right, we've forgotten that one!

aimeos commented 5 years ago

Done: https://github.com/aimeos/ai-controller-jobs/commit/475f2cde30278758f6bb79be87199ac5b9ad05b1