Skip to content

Commit 8d5e965

Browse files
committed
ACP2E-1961: Cron job aggregate_sales_report_bestsellers_data is slow and affects on performance
- fixed static
1 parent 71bca16 commit 8d5e965

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ protected function processStoreAggregate(?int $storeId, $from = null, $to = null
250250
"source_table.entity_id IN (SELECT entity_id FROM " . $this->getTable('sales_order') .
251251
" WHERE store_id = " . $storeId .
252252
" AND state != '" . \Magento\Sales\Model\Order::STATE_CANCELED . "'" .
253-
($subSelect !== null ? " AND " . $this->_makeConditionFromDateRangeSelect($subSelect, $periodExpr) : '') . ")"
253+
($subSelect !== null ?
254+
" AND " . $this->_makeConditionFromDateRangeSelect($subSelect, $periodExpr) :
255+
'') . ")"
254256
)->where(
255257
'order_item.product_type NOT IN(?)',
256258
$this->ignoredProductTypes

0 commit comments

Comments
 (0)