测试RABBITMQ 配置
This commit is contained in:
@@ -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"]
|
||||
@@ -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"}
|
||||
|
||||
@@ -69,3 +69,5 @@ RABBITMQ_PARAMS = {
|
||||
"credentials": pika.credentials.PlainCredentials(username='rabbit', password='123456'),
|
||||
"virtual_host": "/"
|
||||
}
|
||||
|
||||
RABBITMQ_QUEUES = os.getenv("RABBITMQ_QUEUES", "SuperResolution-local")
|
||||
|
||||
Reference in New Issue
Block a user