|
|
@@ -414,10 +414,18 @@ async def update_image_modified_json(
|
|
|
)
|
|
|
)
|
|
|
except Exception as e:
|
|
|
+ logger.error(
|
|
|
+ "调用分数计算服务失败(update/json): image_id=%s card_id=%s score_type=%s endpoint=%s error=%s",
|
|
|
+ id, card_id_to_update, score_type, settings.SCORE_RECALCULATE_ENDPOINT, e,
|
|
|
+ exc_info=True
|
|
|
+ )
|
|
|
raise HTTPException(status_code=500, detail=f"调用分数计算服务失败: {e}")
|
|
|
|
|
|
if response.status_code != 200:
|
|
|
- logger.error(f"分数计算接口返回错误: {response.status_code}, {response.text}")
|
|
|
+ logger.error(
|
|
|
+ "分数计算接口返回错误(update/json): image_id=%s card_id=%s score_type=%s endpoint=%s status=%s body=%s",
|
|
|
+ id, card_id_to_update, score_type, settings.SCORE_RECALCULATE_ENDPOINT, response.status_code, response.text
|
|
|
+ )
|
|
|
raise HTTPException(status_code=response.status_code,
|
|
|
detail=f"分数计算接口返回错误: {response.text}")
|
|
|
logger.info("分数计算完成")
|
|
|
@@ -606,10 +614,18 @@ async def update_gray_image_json(
|
|
|
)
|
|
|
)
|
|
|
except Exception as e:
|
|
|
+ logger.error(
|
|
|
+ "调用分数计算服务失败(update/json_gray): gray_id=%s ring_id=%s card_id=%s score_type=%s endpoint=%s error=%s",
|
|
|
+ id, ring_image_id, card_id, score_type, settings.SCORE_RECALCULATE_ENDPOINT, e,
|
|
|
+ exc_info=True
|
|
|
+ )
|
|
|
raise HTTPException(status_code=500, detail=f"调用分数计算服务失败: {e}")
|
|
|
|
|
|
if response.status_code != 200:
|
|
|
- logger.error(f"分数计算接口返回错误: {response.text}")
|
|
|
+ logger.error(
|
|
|
+ "分数计算接口返回错误(update/json_gray): gray_id=%s ring_id=%s card_id=%s score_type=%s endpoint=%s status=%s body=%s",
|
|
|
+ id, ring_image_id, card_id, score_type, settings.SCORE_RECALCULATE_ENDPOINT, response.status_code, response.text
|
|
|
+ )
|
|
|
raise HTTPException(status_code=response.status_code,
|
|
|
detail=f"分数计算接口返回错误: {response.text}")
|
|
|
|