Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 이벤트 핸들러에도 트랜잭션을 적용할 수 있도록 구현 #37

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

Coalery
Copy link
Member

@Coalery Coalery commented Nov 10, 2023

주요 변경 사항

이벤트 핸들러에도 @Transactional() 데코레이터를 사용하여 트랜잭션을 적용할 수 있도록 구현합니다.

변경 이유

이벤트 처리가 완전하게 비동기로 처리됨에 따라 트랜잭션의 entity manager를 사용하면 문제가 발생할 수 있습니다.

이에 따라, 이벤트 핸들러에서는 트랜잭션의 entity manager가 아니라 기본 entity manager를 사용하도록 수정합니다.

테스트는 나중에 작성합니다. (너무 딜레이됨)

@Coalery Coalery self-assigned this Nov 10, 2023
Copy link

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements
52.32% (-6.6% 🔻)
282/539
🔴 Branches
41.89% (-8.11% 🔻)
31/74
🔴 Functions
28.35% (-6.13% 🔻)
55/194
🔴 Lines
51.28% (-6.28% 🔻)
261/509
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / TransactionMethodExplorer.ts
0% 0% 0% 0%
🔴
... / TransactionalApplier.ts
0% 0% 0% 0%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / Transactional.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / TransactionModule.ts
0%
0% (-100% 🔻)
0% 0%
🔴
... / constant.ts
0% (-100% 🔻)
100% 100%
0% (-100% 🔻)

Test suite run success

26 tests passing in 10 suites.

Report generated by 🧪jest coverage report action from 4691358

@Coalery Coalery merged commit b841211 into main Nov 10, 2023
2 checks passed
@Coalery Coalery deleted the feat/transactional-for-event-handler branch November 10, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant