测试RABBITMQ 配置
This commit is contained in:
@@ -19,4 +19,4 @@ LABEL maintainer="zchengrong@yeah.net" \
|
|||||||
name="trinity_aida"
|
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"]
|
||||||
@@ -2,13 +2,14 @@ import logging
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
|
from app.core.config import RABBITMQ_QUEUES
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@router.get("")
|
@router.get("")
|
||||||
def test():
|
def test():
|
||||||
|
logger.info(RABBITMQ_QUEUES)
|
||||||
logger.info("test")
|
logger.info("test")
|
||||||
return {"message": "ok"}
|
return {"message": "ok"}
|
||||||
|
|||||||
@@ -69,3 +69,5 @@ RABBITMQ_PARAMS = {
|
|||||||
"credentials": pika.credentials.PlainCredentials(username='rabbit', password='123456'),
|
"credentials": pika.credentials.PlainCredentials(username='rabbit', password='123456'),
|
||||||
"virtual_host": "/"
|
"virtual_host": "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RABBITMQ_QUEUES = os.getenv("RABBITMQ_QUEUES", "SuperResolution-local")
|
||||||
|
|||||||
Reference in New Issue
Block a user