Skip to content

Commit 1eaa7c8

Browse files
committed
ACP2E-1961: Cron job aggregate_sales_report_bestsellers_data is slow and affects on performance
- addressed CR
1 parent 8d5e965 commit 1eaa7c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Sales/Model/ResourceModel/Report/Bestsellers.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function aggregate($from = null, $to = null)
166166
* @return void
167167
* @throws LocalizedException
168168
*/
169-
protected function clearByDateRange($from = null, $to = null): void
169+
private function clearByDateRange($from = null, $to = null): void
170170
{
171171
$subSelect = $this->getRangeSubSelect($from, $to);
172172
$this->_clearTableByDateRange($this->getMainTable(), $from, $to, $subSelect);
@@ -179,7 +179,7 @@ protected function clearByDateRange($from = null, $to = null): void
179179
* @param string|int|\DateTime|array|null $to
180180
* @return Select|null
181181
*/
182-
protected function getRangeSubSelect($from = null, $to = null): ?Select
182+
private function getRangeSubSelect($from = null, $to = null): ?Select
183183
{
184184
if ($from !== null || $to !== null) {
185185
$subSelect = $this->_getTableDateRangeSelect(
@@ -205,7 +205,7 @@ protected function getRangeSubSelect($from = null, $to = null): ?Select
205205
* @return void
206206
* @throws LocalizedException
207207
*/
208-
protected function processStoreAggregate(?int $storeId, $from = null, $to = null): void
208+
private function processStoreAggregate(?int $storeId, $from = null, $to = null): void
209209
{
210210
$connection = $this->getConnection();
211211

0 commit comments

Comments
 (0)