mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Avoid RabbitMQ consumer to loop
When the `parseEntry` returns null it means the entry already exists in the database. Sending `false` as return, will requeue the message which will then loop forever.
This commit is contained in:
parent
576d285ddf
commit
1e3d74a9cf
1 changed files with 3 additions and 2 deletions
|
@ -50,9 +50,10 @@ abstract class AbstractConsumer
|
|||
$entry = $this->import->parseEntry($storedEntry);
|
||||
|
||||
if (null === $entry) {
|
||||
$this->logger->warning('Unable to parse entry', ['entry' => $storedEntry]);
|
||||
$this->logger->warning('Entry already exists', ['entry' => $storedEntry]);
|
||||
|
||||
return false;
|
||||
// return true to skip message
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue