Skip to content

Commit

Permalink
Merge pull request #730 from Nosto/hotfix/5.2.5
Browse files Browse the repository at this point in the history
Hotfix 5.2.5 - Fix MQ consumers memory issue
  • Loading branch information
olsi-qose authored Mar 17, 2021
2 parents d476baa + 77edd85 commit 31e20f8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

### 5.2.5
* Fix product update consumer running out of memory issue

### 5.2.4
* Fix order tagging rendering in case variation tags were missing

Expand Down
2 changes: 1 addition & 1 deletion Model/Service/Sync/AbstractBulkConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ public function processOperation($operation)
$message = __('Success.');
$operation->setStatus(OperationInterface::STATUS_TYPE_COMPLETE)
->setResultMessage($message);
$this->entityManager->save($operation);
} catch (Exception $e) {
$this->logger->critical(sprintf('Bulk uuid: %s. %s', $operation->getBulkUuid(), $e->getMessage()));
/** @phan-suppress-next-line PhanTypeMismatchArgument */
$message = __('Something went wrong when syncing products to Nosto. Check log for details.');
$operation->setStatus(OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED)
->setErrorCode($e->getCode())
->setResultMessage($message);
} finally {
$this->entityManager->save($operation);
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nosto/module-nostotagging",
"description": "Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.",
"type": "magento2-module",
"version": "5.2.4",
"version": "5.2.5",
"require-dev": {
"phpmd/phpmd": "^2.5",
"sebastian/phpcpd": "*",
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
<!--suppress XmlUnboundNsPrefix -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Nosto_Tagging" setup_version="5.2.4"/>
<module name="Nosto_Tagging" setup_version="5.2.5"/>
</config>
4 changes: 2 additions & 2 deletions etc/queue_consumer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
<consumer name="nosto_product_sync.update"
queue="nosto_product_sync.update"
connection="db"
maxMessages="5000"
maxMessages="20"
consumerInstance="Magento\Framework\MessageQueue\Consumer"
handler="Nosto\Tagging\Model\Service\Sync\Upsert\AsyncBulkConsumer::processOperation"/>
<consumer name="nosto_product_sync.delete"
queue="nosto_product_sync.delete"
connection="db"
maxMessages="5000"
maxMessages="100"
consumerInstance="Magento\Framework\MessageQueue\Consumer"
handler="Nosto\Tagging\Model\Service\Sync\Delete\AsyncBulkConsumer::processOperation"/>
</config>

0 comments on commit 31e20f8

Please sign in to comment.