mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 17:44:44 +08:00
Renamed Rabbit instances to use RabbitMq
This commit is contained in:
@@ -23,7 +23,7 @@ return [
|
||||
'async' => [
|
||||
EventDispatcher\Event\VisitLocated::class => [
|
||||
EventDispatcher\NotifyVisitToMercure::class,
|
||||
EventDispatcher\NotifyVisitToRabbit::class,
|
||||
EventDispatcher\NotifyVisitToRabbitMq::class,
|
||||
EventDispatcher\NotifyVisitToWebHooks::class,
|
||||
EventDispatcher\UpdateGeoLiteDb::class,
|
||||
],
|
||||
@@ -35,7 +35,7 @@ return [
|
||||
EventDispatcher\LocateVisit::class => ConfigAbstractFactory::class,
|
||||
EventDispatcher\NotifyVisitToWebHooks::class => ConfigAbstractFactory::class,
|
||||
EventDispatcher\NotifyVisitToMercure::class => ConfigAbstractFactory::class,
|
||||
EventDispatcher\NotifyVisitToRabbit::class => ConfigAbstractFactory::class,
|
||||
EventDispatcher\NotifyVisitToRabbitMq::class => ConfigAbstractFactory::class,
|
||||
EventDispatcher\UpdateGeoLiteDb::class => ConfigAbstractFactory::class,
|
||||
],
|
||||
|
||||
@@ -43,7 +43,7 @@ return [
|
||||
EventDispatcher\NotifyVisitToMercure::class => [
|
||||
EventDispatcher\CloseDbConnectionEventListenerDelegator::class,
|
||||
],
|
||||
EventDispatcher\NotifyVisitToRabbit::class => [
|
||||
EventDispatcher\NotifyVisitToRabbitMq::class => [
|
||||
EventDispatcher\CloseDbConnectionEventListenerDelegator::class,
|
||||
],
|
||||
EventDispatcher\NotifyVisitToWebHooks::class => [
|
||||
@@ -74,12 +74,12 @@ return [
|
||||
'em',
|
||||
'Logger_Shlink',
|
||||
],
|
||||
EventDispatcher\NotifyVisitToRabbit::class => [
|
||||
EventDispatcher\NotifyVisitToRabbitMq::class => [
|
||||
AMQPStreamConnection::class,
|
||||
'em',
|
||||
'Logger_Shlink',
|
||||
Visit\Transformer\OrphanVisitDataTransformer::class,
|
||||
'config.rabbit.enabled',
|
||||
'config.rabbitmq.enabled',
|
||||
],
|
||||
EventDispatcher\UpdateGeoLiteDb::class => [GeolocationDbUpdater::class, 'Logger_Shlink'],
|
||||
],
|
||||
|
||||
@@ -17,7 +17,7 @@ use Throwable;
|
||||
use function Shlinkio\Shlink\Common\json_encode;
|
||||
use function sprintf;
|
||||
|
||||
class NotifyVisitToRabbit
|
||||
class NotifyVisitToRabbitMq
|
||||
{
|
||||
private const NEW_VISIT_QUEUE = 'https://shlink.io/new-visit';
|
||||
private const NEW_ORPHAN_VISIT_QUEUE = 'https://shlink.io/new-orphan-visit';
|
||||
@@ -18,7 +18,7 @@ use RuntimeException;
|
||||
use Shlinkio\Shlink\Core\Entity\ShortUrl;
|
||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
||||
use Shlinkio\Shlink\Core\EventDispatcher\Event\VisitLocated;
|
||||
use Shlinkio\Shlink\Core\EventDispatcher\NotifyVisitToRabbit;
|
||||
use Shlinkio\Shlink\Core\EventDispatcher\NotifyVisitToRabbitMq;
|
||||
use Shlinkio\Shlink\Core\Model\ShortUrlMeta;
|
||||
use Shlinkio\Shlink\Core\Model\Visitor;
|
||||
use Shlinkio\Shlink\Core\Visit\Transformer\OrphanVisitDataTransformer;
|
||||
@@ -27,11 +27,11 @@ use Throwable;
|
||||
use function count;
|
||||
use function Functional\contains;
|
||||
|
||||
class NotifyVisitToRabbitTest extends TestCase
|
||||
class NotifyVisitToRabbitMqTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
private NotifyVisitToRabbit $listener;
|
||||
private NotifyVisitToRabbitMq $listener;
|
||||
private ObjectProphecy $connection;
|
||||
private ObjectProphecy $em;
|
||||
private ObjectProphecy $logger;
|
||||
@@ -49,7 +49,7 @@ class NotifyVisitToRabbitTest extends TestCase
|
||||
$this->em = $this->prophesize(EntityManagerInterface::class);
|
||||
$this->logger = $this->prophesize(LoggerInterface::class);
|
||||
|
||||
$this->listener = new NotifyVisitToRabbit(
|
||||
$this->listener = new NotifyVisitToRabbitMq(
|
||||
$this->connection->reveal(),
|
||||
$this->em->reveal(),
|
||||
$this->logger->reveal(),
|
||||
@@ -61,7 +61,7 @@ class NotifyVisitToRabbitTest extends TestCase
|
||||
/** @test */
|
||||
public function doesNothingWhenTheFeatureIsNotEnabled(): void
|
||||
{
|
||||
$listener = new NotifyVisitToRabbit(
|
||||
$listener = new NotifyVisitToRabbitMq(
|
||||
$this->connection->reveal(),
|
||||
$this->em->reveal(),
|
||||
$this->logger->reveal(),
|
||||
Reference in New Issue
Block a user