Skip to content

Commit

Permalink
magento/adobe-stock-integration#1724: Support batches processing for …
Browse files Browse the repository at this point in the history
…synchronization queue messages - fixed failed static test
  • Loading branch information
yolouiese committed Aug 21, 2020
1 parent 16dc1fa commit d5276dd
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function __construct(

/**
* Run media files synchronization.
*
* @param OperationInterface $operation
* @throws LocalizedException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public function __construct(
}

/**
* Publish media content synchronization message to the message queue.
* Publish media content synchronization message to the message queue
*
* @param array $contentIdentities
*/
public function execute(array $contentIdentities = []) : void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ public function execute(array $mediaContentIdentities): void
if ($identity[self::MEDIA_CONTENT_TYPE] === self::FIELD_CMS_PAGE
|| $identity[self::MEDIA_CONTENT_TYPE] === self::FIELD_CMS_BLOCK
) {
$content = $this->getCmsMediaContent($identity[self::MEDIA_CONTENT_TYPE], $identity[self::MEDIA_CONTENT_ENTITY_ID]);
$content = $this->getCmsMediaContent(
$identity[self::MEDIA_CONTENT_TYPE], $identity[self::MEDIA_CONTENT_ENTITY_ID]
);
} else {
$content = implode(PHP_EOL, $this->getEntityContents->execute($contentIdentity));
}
Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/MediaContentSynchronization/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"magento/framework": "*",
"magento/module-media-content-synchronization-api": "*",
"magento/framework-message-queue": "*",
"magento/module-media-content-api": "*"
"magento/module-media-content-api": "*",
"magento/module-asynchronous-operations": "*"
},
"suggest": {
"magento/module-media-gallery-synchronization": "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"description": "Magento module responsible for the media content synchronization implementation API",
"require": {
"php": "~7.3.0||~7.4.0",
"magento/framework": "*"
"magento/framework": "*",
"magento/module-media-content-api": "*"
},
"type": "magento2-module",
"license": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function __construct(

/**
* Run media files synchronization.
*
* @param array $paths
* @throws LocalizedException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public function __construct(PublisherInterface $publisher)
}

/**
* Publish media content synchronization message to the message queue.
* Publish media content synchronization message to the message queue
*
* @param array $paths
*/
public function execute(array $paths = []) : void
Expand Down

0 comments on commit d5276dd

Please sign in to comment.