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

Commit 9779e03

Browse files
Merge pull request #37 from magento-epam/SPRINT-1-MAGETWO-91762
MAGETWO-91762: [Magento Cloud] - MYSQL Message queue is fetching mess…
2 parents 96b4710 + 6bcc35a commit 9779e03

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/MysqlMq/Model/ResourceModel/Queue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function getMessages($queueName, $limit = null)
151151
'queue_message_status.status IN (?)',
152152
[QueueManagement::MESSAGE_STATUS_NEW, QueueManagement::MESSAGE_STATUS_RETRY_REQUIRED]
153153
)->where('queue.name = ?', $queueName)
154-
->order('queue_message_status.updated_at DESC');
154+
->order('queue_message_status.updated_at ASC');
155155

156156
if ($limit) {
157157
$select->limit($limit);

app/code/Magento/MysqlMq/Test/Unit/Model/ResourceModel/QueueTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function testGetMessages()
206206
]
207207
)->willReturnSelf();
208208
$select->expects($this->once())
209-
->method('order')->with('queue_message_status.updated_at DESC')->willReturnSelf();
209+
->method('order')->with('queue_message_status.updated_at ASC')->willReturnSelf();
210210
$select->expects($this->once())->method('limit')->with($limit)->willReturnSelf();
211211
$connection->expects($this->once())->method('fetchAll')->with($select)->willReturn($messages);
212212
$this->assertEquals($messages, $this->queue->getMessages($queueName, $limit));

0 commit comments

Comments
 (0)