代码优化
This commit is contained in:
parent
06c93598b7
commit
b66978ce2f
2
main.py
2
main.py
|
|
@ -190,7 +190,7 @@ async def get_goods_info(task_data: GoodsInfo, task_manager: Any = Depends(get_t
|
|||
except Exception as e:
|
||||
print(f"任务异常 - ID: {task_id}, 错误: {str(e)}")
|
||||
data = {"task_id": params["task_id"], "status": 3}
|
||||
await task_manager.insert_task_record(data)
|
||||
await task_manager.update_task_record(data)
|
||||
raise HTTPException(status_code=503, detail="抓取商品数据失败,请重新尝试")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue