Skip to content

Commit

Permalink
Merge pull request #334 from MatthiasKuehneEllerhold/0.12.3-fix-limit…
Browse files Browse the repository at this point in the history
…1FOR_UPDATE

[0.x] DoctrineDriver: Fix "LIMIT 1FOR UPDATE"
  • Loading branch information
acrobat authored Nov 5, 2017
2 parents 01fcfad + b0d3efa commit c452caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bernard/Driver/DoctrineDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected function doPopMessage($queueName)
{
$query = 'SELECT id, message FROM bernard_messages
WHERE queue = :queue AND visible = :visible
ORDER BY sentAt, id LIMIT 1' . $this->connection->getDatabasePlatform()->getForUpdateSql();
ORDER BY sentAt, id LIMIT 1 ' . $this->connection->getDatabasePlatform()->getForUpdateSql();

list($id, $message) = $this->connection->fetchArray($query, array(
'queue' => $queueName,
Expand Down

0 comments on commit c452caa

Please sign in to comment.