번역오류 수정 및 CTA적용

This commit is contained in:
skkim committed 2026-07-21 13:56:40 +09:00
commit 788e76ef76
8 files changed
+216 -37

No files matched your search

+13 -3
View File
@@ -857,6 +857,16 @@ async def get_image_tags_by_task_id(task_id: str) -> list[dict]:
# print(stmt.compile(dialect=mysql.dialect(), compile_kwargs={"literal_binds": True}))
rows = (await session.execute(stmt)).all()
# print("rows", rows)
# print(rows)
# print("image" , [{"image_url": row.img_url, "image_tag": row.img_tag} for row in rows])
return [{"image_url": row.img_url, "image_tag": row.img_tag} for row in rows]
# img_tag가 JSON 리터럴 null로 저장된 행(태깅 실패 잔재)은 SQL IS NOT NULL 필터를
# 통과하므로 파이썬 레벨에서 한 번 더 걸러낸다.
null_tag_urls = [row.img_url for row in rows if row.img_tag is None]
if null_tag_urls:
logger.warning(
f"[get_image_tags_by_task_id] img_tag가 null인 이미지 {len(null_tag_urls)}개 제외 "
f"- task_id: {task_id}, urls: {null_tag_urls}"
)
return [
{"image_url": row.img_url, "image_tag": row.img_tag}
for row in rows
if row.img_tag is not None
]