feat(新功能): fix(修复bug): 取消design-v2 java端测试接口(重构): test(增加测试):

This commit is contained in:
zhh
2025-09-27 00:02:23 +08:00
parent 0a048bf37f
commit 167faa10c8

View File

@@ -212,11 +212,11 @@ def design_generate_v2(request_data):
items_response['synthesis_url'] = synthesis_single(item_result['front_image'], item_result['back_image'])
# 发送结果给java端
url = JAVA_STREAM_API_URL
xu_pei_test_url = "https://137f6b5c3490.ngrok-free.app/api/third/party/receiveDesignResults"
tianxaing_test_url = "https://c2ae520723c9.ngrok-free.app/api/third/party/receiveDesignResults"
# xu_pei_test_url = "https://137f6b5c3490.ngrok-free.app/api/third/party/receiveDesignResults"
# tianxaing_test_url = "https://c2ae520723c9.ngrok-free.app/api/third/party/receiveDesignResults"
logger.info(f"java 回调 -> {url}")
logger.info(f"xupei java 回调 -> {xu_pei_test_url}")
logger.info(f"tianxiang java 回调 -> {tianxaing_test_url}")
# logger.info(f"xupei java 回调 -> {xu_pei_test_url}")
# logger.info(f"tianxiang java 回调 -> {tianxaing_test_url}")
headers = {
'Accept': "*/*",
@@ -231,14 +231,14 @@ def design_generate_v2(request_data):
# 打印结果
logger.info(response.text)
test_xp_response = post_request(xu_pei_test_url, json_data=items_response, headers=headers)
test_response = post_request(tianxaing_test_url, json_data=items_response, headers=headers)
if test_response:
# test_xp_response = post_request(xu_pei_test_url, json_data=items_response, headers=headers)
# test_response = post_request(tianxaing_test_url, json_data=items_response, headers=headers)
#
# if test_response:
# 打印结果
logger.info(f"tianxiang test response : {test_response.text}")
if test_xp_response:
logger.info(f"xupei test response : {test_xp_response.text}")
# logger.info(f"tianxiang test response : {test_response.text}")
# if test_xp_response:
# logger.info(f"xupei test response : {test_xp_response.text}")
for step, object in enumerate(objects_data):
t = threading.Thread(target=process_object, args=(step, object))