Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

Commit

Permalink
Merge pull request #37 from magento-epam/SPRINT-1-MAGETWO-91762
Browse files Browse the repository at this point in the history
MAGETWO-91762: [Magento Cloud] - MYSQL Message queue is fetching mess…
  • Loading branch information
vital-pantsialeyeu authored Aug 10, 2018
2 parents 96b4710 + 6bcc35a commit 9779e03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/MysqlMq/Model/ResourceModel/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function getMessages($queueName, $limit = null)
'queue_message_status.status IN (?)',
[QueueManagement::MESSAGE_STATUS_NEW, QueueManagement::MESSAGE_STATUS_RETRY_REQUIRED]
)->where('queue.name = ?', $queueName)
->order('queue_message_status.updated_at DESC');
->order('queue_message_status.updated_at ASC');

if ($limit) {
$select->limit($limit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function testGetMessages()
]
)->willReturnSelf();
$select->expects($this->once())
->method('order')->with('queue_message_status.updated_at DESC')->willReturnSelf();
->method('order')->with('queue_message_status.updated_at ASC')->willReturnSelf();
$select->expects($this->once())->method('limit')->with($limit)->willReturnSelf();
$connection->expects($this->once())->method('fetchAll')->with($select)->willReturn($messages);
$this->assertEquals($messages, $this->queue->getMessages($queueName, $limit));
Expand Down

0 comments on commit 9779e03

Please sign in to comment.