(Grav GitSync) Automatic Commit from smokephil
This commit is contained in:
parent
ab8f386766
commit
54730a9480
251 changed files with 5008 additions and 8945 deletions
|
|
@ -14,6 +14,7 @@ namespace Symfony\Component\Messenger\Bridge\Redis\Transport;
|
|||
use Symfony\Component\Messenger\Envelope;
|
||||
use Symfony\Component\Messenger\Exception\LogicException;
|
||||
use Symfony\Component\Messenger\Exception\MessageDecodingFailedException;
|
||||
use Symfony\Component\Messenger\Exception\TransportException;
|
||||
use Symfony\Component\Messenger\Transport\Receiver\ReceiverInterface;
|
||||
use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer;
|
||||
use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
|
||||
|
|
@ -27,7 +28,7 @@ class RedisReceiver implements ReceiverInterface
|
|||
private $connection;
|
||||
private $serializer;
|
||||
|
||||
public function __construct(Connection $connection, SerializerInterface $serializer = null)
|
||||
public function __construct(Connection $connection, ?SerializerInterface $serializer = null)
|
||||
{
|
||||
$this->connection = $connection;
|
||||
$this->serializer = $serializer ?? new PhpSerializer();
|
||||
|
|
@ -44,6 +45,18 @@ class RedisReceiver implements ReceiverInterface
|
|||
return [];
|
||||
}
|
||||
|
||||
if (null === $message['data']) {
|
||||
try {
|
||||
$this->connection->reject($message['id']);
|
||||
} catch (TransportException $e) {
|
||||
if ($e->getPrevious()) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->get();
|
||||
}
|
||||
|
||||
$redisEnvelope = json_decode($message['data']['message'] ?? '', true);
|
||||
|
||||
if (null === $redisEnvelope) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue