diff --git a/src/main.py b/src/main.py index 9d39920..cf1c163 100644 --- a/src/main.py +++ b/src/main.py @@ -6,7 +6,6 @@ import uvicorn from aio_pika.exceptions import AMQPException from fastapi import FastAPI, HTTPException, Request from fastapi.responses import JSONResponse -from fastapi.security.api_key import APIKeyHeader from pydantic import BaseModel, Field from starlette.exceptions import HTTPException as StarletteHTTPException diff --git a/src/rabbitmq_handler.py b/src/rabbitmq_handler.py index 1758c98..2a45e20 100644 --- a/src/rabbitmq_handler.py +++ b/src/rabbitmq_handler.py @@ -15,11 +15,11 @@ logger = setup_logger(__name__) class RabbitMQConsumer: """Pull-based RabbitMQ consumer. Messages are fetched on demand, one queue per user.""" def __init__(self): - self.rmq_host = os.getenv("BACKEND_PUSH_NOTIFICATIONS_RMQ_HOST", "localhost") - self.rmq_vhost = os.getenv("BACKEND_PUSH_NOTIFICATIONS_RMQ_VHOST", "app_notifications") - self.rmq_exchange = os.getenv("BACKEND_PUSH_NOTIFICATIONS_RMQ_EXCHANGE", "app_notifications") - self.pull_queue_prefix = os.getenv("BACKEND_PULL_NOTIFICATIONS_RMQ_QUEUE_PREFIX", "notifications-pull") - self.pull_routing_prefix = os.getenv("BACKEND_PULL_NOTIFICATIONS_RMQ_ROUTING_PREFIX", "notify.pull") + self.rmq_host = os.getenv("RMQ_HOST", "localhost") + self.rmq_vhost = os.getenv("RMQ_VHOST", "app_notifications") + self.rmq_exchange = os.getenv("RMQ_EXCHANGE", "app_notifications") + self.pull_queue_prefix = os.getenv("RMQ_QUEUE_PREFIX", "notifications-pull") + self.pull_routing_prefix = os.getenv("RMQ_ROUTING_PREFIX", "notify.pull") self._user_locks: weakref.WeakValueDictionary[int, asyncio.Lock] = weakref.WeakValueDictionary() self.connection: aio_pika.RobustConnection | None = None