Skip to content

Commit

Permalink
Fix typo in rabbitmq var
Browse files Browse the repository at this point in the history
  • Loading branch information
falvaradorodriguez committed Dec 17, 2024
1 parent bfa0850 commit 31a60e9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.docker
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REDIS_URL=redis://redis:6379/0
DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/postgres
RABBITMQ_AMPQ_URL=amqp://guest:guest@rabbitmq:5672/
RABBITMQ_AMQP_URL=amqp://guest:guest@rabbitmq:5672/
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REDIS_URL=redis://redis:6379/0
DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/postgres
RABBITMQ_AMPQ_URL=amqp://guest:guest@rabbitmq:5672/
RABBITMQ_AMQP_URL=amqp://guest:guest@rabbitmq:5672/
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Settings(BaseSettings):
DATABASE_URL: str = "psql://postgres:"
DATABASE_POOL_CLASS: str = "AsyncAdaptedQueuePool"
DATABASE_POOL_SIZE: int = 10
RABBITMQ_AMPQ_URL: str = "amqp://guest:guest@"
RABBITMQ_AMQP_URL: str = "amqp://guest:guest@"
RABBITMQ_AMQP_EXCHANGE: str = "safe-transaction-service-events"
RABBITMQ_DECODER_EVENTS_QUEUE_NAME: str = "safe-decoder-service"
SECRET_KEY: str = secrets.token_urlsafe(
Expand Down
2 changes: 1 addition & 1 deletion app/datasources/queue/queue_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def _connect(self, loop: AbstractEventLoop) -> None:
"""
try:
self._connection = await aio_pika.connect_robust(
url=settings.RABBITMQ_AMPQ_URL, loop=loop
url=settings.RABBITMQ_AMQP_URL, loop=loop
)
except aio_pika.exceptions.AMQPConnectionError as e:
raise QueueProviderUnableToConnectException(e)
Expand Down
2 changes: 1 addition & 1 deletion app/tests/datasources/queue/test_queue_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def test_connect_success(self):
async def test_connect_failure(self):
provider = QueueProvider()

with patch("app.config.settings.RABBITMQ_AMPQ_URL", "amqp://invalid-url"):
with patch("app.config.settings.RABBITMQ_AMQP_URL", "amqp://invalid-url"):
with self.assertRaises(QueueProviderUnableToConnectException):
await provider.connect(self.loop)

Expand Down

0 comments on commit 31a60e9

Please sign in to comment.