update
This commit is contained in:
parent
adca35f7bf
commit
2fc2650e82
@ -214,20 +214,20 @@ async def check_tryon_status(
|
||||
url = status_response.get("image_url")
|
||||
# 下载图片并上传到自己的腾讯云
|
||||
# 下载图片
|
||||
response = httpx.get(url)
|
||||
image_data = response.content
|
||||
async with httpx.AsyncClient() as client:
|
||||
response = await client.get(url)
|
||||
image_data = response.content
|
||||
|
||||
# 上传到腾讯云
|
||||
# 获取腾讯云的配置
|
||||
qcloud_service = QCloudCOSService()
|
||||
# 上传图片到腾讯云
|
||||
upload_result = qcloud_service.upload_file(image_data, "tryon_results")
|
||||
# 上传到腾讯云
|
||||
# 获取腾讯云的配置
|
||||
qcloud_service = QCloudCOSService()
|
||||
# 上传图片到腾讯云
|
||||
upload_result = qcloud_service.upload_file(image_data, "tryon_results")
|
||||
|
||||
db_tryon.completion_url = upload_result.get("url")
|
||||
|
||||
db_tryon.completion_url = upload_result.get("url")
|
||||
|
||||
db.commit()
|
||||
db.refresh(db_tryon)
|
||||
db.commit()
|
||||
db.refresh(db_tryon)
|
||||
|
||||
logger.info(f"试穿任务状态更新: {db_tryon.task_status}")
|
||||
except Exception as e:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user