diff --git a/app/api/api_test.py b/app/api/api_test.py index 1271f95..a273b11 100644 --- a/app/api/api_test.py +++ b/app/api/api_test.py @@ -4,7 +4,7 @@ import logging from fastapi import APIRouter from fastapi import HTTPException -from app.core.config import SR_RABBITMQ_QUEUES, GI_RABBITMQ_QUEUES, GPI_RABBITMQ_QUEUES, GRI_RABBITMQ_QUEUES, OSS +from app.core.config import SR_RABBITMQ_QUEUES, GI_RABBITMQ_QUEUES, GPI_RABBITMQ_QUEUES, GRI_RABBITMQ_QUEUES, OSS, JAVA_STREAM_API_URL from app.schemas.response_template import ResponseModel logger = logging.getLogger() @@ -18,6 +18,7 @@ def test(id: int): "GI_RABBITMQ_QUEUES": GI_RABBITMQ_QUEUES, "GPI_RABBITMQ_QUEUES": GPI_RABBITMQ_QUEUES, "GRI_RABBITMQ_QUEUES": GRI_RABBITMQ_QUEUES, + "JAVA_STREAM_API_URL": JAVA_STREAM_API_URL, "local_oss_server": OSS } logger.info(json.dumps(data)) diff --git a/app/core/config.py b/app/core/config.py index 7629429..1d11a0b 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -34,6 +34,9 @@ else: RABBITMQ_ENV = "-dev" # 开发环境 # RABBITMQ_ENV = "-local" # 本地测试环境 +JAVA_STREAM_API_URL = os.getenv("JAVA_STREAM_API_URL", "https://api.aida.com.hk/api/third/party/receiveDesignResults") + + settings = Settings() # minio 配置 diff --git a/app/service/design_fast/design_generate.py b/app/service/design_fast/design_generate.py index 04270b9..7876239 100644 --- a/app/service/design_fast/design_generate.py +++ b/app/service/design_fast/design_generate.py @@ -198,7 +198,7 @@ def design_generate_v2(request_data): }) items_response['synthesis_url'] = synthesis_single(item_result['front_image'], item_result['back_image']) # 发送结果给java端 - url = "https://develop.api.aida.com.hk/api/third/party/receiveDesignResults" + url = JAVA_STREAM_API_URL headers = { 'Accept': "*/*", 'Accept-Encoding': "gzip, deflate, br",