Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix 5.2.5 - Fix MQ consumers memory issue #730

Merged
merged 3 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>