diff --git a/app/core/config.py b/app/core/config.py index 8b8ce60..cf72b85 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -70,4 +70,4 @@ RABBITMQ_PARAMS = { "virtual_host": "/" } -RABBITMQ_QUEUES = os.getenv("RABBITMQ_QUEUES", "SuperResolution-local") +RABBITMQ_QUEUES = os.getenv("RABBITMQ_QUEUES", "SuperResolution-dev") diff --git a/app/service/super_resolution/service.py b/app/service/super_resolution/service.py index d788e20..f015c6c 100644 --- a/app/service/super_resolution/service.py +++ b/app/service/super_resolution/service.py @@ -16,7 +16,7 @@ import tritonclient.grpc as grpcclient from PIL import Image from minio import Minio -from app.core.config import MINIO_IP, MINIO_ACCESS, MINIO_SECRET, MINIO_SECURE, MINIO_PORT, REDIS_HOST, REDIS_PORT, REDIS_DB, SR_MODEL_NAME, RABBITMQ_PARAMS +from app.core.config import MINIO_IP, MINIO_ACCESS, MINIO_SECRET, MINIO_SECURE, MINIO_PORT, REDIS_HOST, REDIS_PORT, REDIS_DB, SR_MODEL_NAME, RABBITMQ_PARAMS, RABBITMQ_QUEUES from app.schemas.super_resolution import SuperResolutionModel from app.service.utils.decorator import RunTime @@ -136,7 +136,7 @@ def publish_message(sr_data): connection = pika.BlockingConnection(pika.ConnectionParameters(**RABBITMQ_PARAMS)) channel = connection.channel() # 发布消息,并设置回调函数 - channel.basic_publish(exchange='', routing_key='SuperResolution-local', body=sr_data) + channel.basic_publish(exchange='', routing_key=RABBITMQ_QUEUES, body=sr_data) logger.info(f" [x] Sent {sr_data}") connection.close()