测试RABBITMQ 配置

This commit is contained in:
zchen
2024-03-26 11:34:54 +08:00
parent 3ff9463e5d
commit 39678f011b
3 changed files with 6 additions and 3 deletions

View File

@@ -19,4 +19,4 @@ LABEL maintainer="zchengrong@yeah.net" \
name="trinity_aida"
CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app"]
CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "RABBITMQ_QUEUES=123"]

View File

@@ -2,13 +2,14 @@ import logging
from fastapi import APIRouter
from app.core.config import RABBITMQ_QUEUES
logger = logging.getLogger()
router = APIRouter()
@router.get("")
def test():
logger.info(RABBITMQ_QUEUES)
logger.info("test")
return {"message": "ok"}

View File

@@ -69,3 +69,5 @@ RABBITMQ_PARAMS = {
"credentials": pika.credentials.PlainCredentials(username='rabbit', password='123456'),
"virtual_host": "/"
}
RABBITMQ_QUEUES = os.getenv("RABBITMQ_QUEUES", "SuperResolution-local")