mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-24 23:58:13 +00:00
Import: we now skip messages when user is null
This commit is contained in:
parent
48be826ea9
commit
b45b6b6707
3 changed files with 6 additions and 3 deletions
|
@ -46,7 +46,8 @@ abstract class AbstractConsumer
|
||||||
if (null === $user) {
|
if (null === $user) {
|
||||||
$this->logger->warning('Unable to retrieve user', ['entry' => $storedEntry]);
|
$this->logger->warning('Unable to retrieve user', ['entry' => $storedEntry]);
|
||||||
|
|
||||||
return false;
|
// return true to skip message
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->import->setUser($user);
|
$this->import->setUser($user);
|
||||||
|
|
|
@ -183,7 +183,9 @@ JSON;
|
||||||
|
|
||||||
$message = new AMQPMessage($body);
|
$message = new AMQPMessage($body);
|
||||||
|
|
||||||
$consumer->execute($message);
|
$res = $consumer->execute($message);
|
||||||
|
|
||||||
|
$this->assertTrue($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMessageWithEntryProcessed()
|
public function testMessageWithEntryProcessed()
|
||||||
|
|
|
@ -182,7 +182,7 @@ JSON;
|
||||||
|
|
||||||
$res = $consumer->manage($body);
|
$res = $consumer->manage($body);
|
||||||
|
|
||||||
$this->assertFalse($res);
|
$this->assertTrue($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMessageWithEntryProcessed()
|
public function testMessageWithEntryProcessed()
|
||||||
|
|
Loading…
Reference in a new issue