fix: 썸네일 슬롯 매칭 개선, 가사 스키마 오류 수정, 롤백 로그 레벨 조정
- creatomate: 썸네일 슬롯 한정 subject 일치 시 space_type 페널티 면제, subject 가중치 상향 (2.0 → 3.0) - lyric 스키마: 트레일링 콤마로 tuple이 되어버린 필드 정의 수정, 중복 genre 필드 제거 - session: 4xx 도메인 예외 롤백 로그를 traceback 없는 WARNING으로 완화 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6090d500f9
commit
cbc3f47b54
3 files changed
+30
-14
No files matched your search
+12
-5
@@ -139,11 +139,18 @@ async def get_session() -> AsyncGenerator[AsyncSession, None]:
|
||||
raise
|
||||
except Exception as e:
|
||||
await session.rollback()
|
||||
logger.error(traceback.format_exc())
|
||||
logger.error(
|
||||
f"[get_session] ROLLBACK - error: {type(e).__name__}: {e}, "
|
||||
f"duration: {(time.perf_counter() - start_time)*1000:.1f}ms"
|
||||
)
|
||||
# status_code < 500인 도메인 예외(계정 미연동 등)는 정상적인 비즈니스 흐름이므로 ERROR로 남기지 않음
|
||||
if getattr(e, "status_code", 500) < 500:
|
||||
logger.warning(
|
||||
f"[get_session] ROLLBACK - client error: {type(e).__name__}: {e}, "
|
||||
f"duration: {(time.perf_counter() - start_time)*1000:.1f}ms"
|
||||
)
|
||||
else:
|
||||
logger.error(traceback.format_exc())
|
||||
logger.error(
|
||||
f"[get_session] ROLLBACK - error: {type(e).__name__}: {e}, "
|
||||
f"duration: {(time.perf_counter() - start_time)*1000:.1f}ms"
|
||||
)
|
||||
raise
|
||||
finally:
|
||||
total_time = time.perf_counter() - start_time
|
||||
|
||||
Reference in new issue
Block a user