-
Notifications
You must be signed in to change notification settings - Fork 16
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
Refactor/#754 delete with outbox #758
Conversation
π Jacoco Test Coverage
|
μ’μ μκ°μΈ κ² κ°μμ μ λ approve νκ² μ΅λλ€. |
427e830
to
e6c87c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λλ
Έκ° μνλ λ°©μμ΄ μ΄λ€κ±΄μ§ μ μ΄ν΄κ° λμμ΅λλ€! π
μ½λμμκ°μ¬ν©λλ€!
@@ -65,6 +66,7 @@ public void deleteTrip(final TripDeleteEvent event) { | |||
|
|||
dayLogRepository.deleteByIds(dayLogIds); | |||
tripCityRepository.deleteAllByTripId(event.getTripId()); | |||
outBoxRepository.deleteByTargetId(event.getTripId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targetIdκ° κ²ΉμΉ μλ μμΌλ typeμ 보κΉμ§ ν¨κ» λ£μ΄μ€μΌκ² κ΅°μ
private final ApplicationEventPublisher publisher; | ||
|
||
@Scheduled(cron = "*/2 * * * * *") | ||
public void execute() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
νμμ΄ μ€μΌμ€λ§μμ λ°λ‘ λ°ννλκ΅°μ! νμ€ν μ§κΈμ μμκ° μ€μν μ΄λ²€νΈκ° μμΌλ λλ Έλ§λλ‘ μ΄ λ°©μμ΄ λ λͺ λ£ν΄λ³΄μ λλ€
if (outBox.isMember()) { | ||
final List<Long> tripIds = customTripRepository.findTripIdsByMemberId(outBox.getTargetId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outboxμ λͺ¨λ μ 보λ₯Ό μ μ₯νλ λμ νκ² λλ©μΈμ μμ΄λλ§ μ μ₯νκ³ , λλ¨Έμ§ μ 보λ λ€μ μ‘°νν΄μ κ°μ Έμ€λκ΅°μ!
μ νμν κ°μ μ λΆ outboxμ μ μ₯νλ μλ°μ μλ€κ³ μκ°νλλ°, μκ°ν΄λ³΄λ μ΄λ κ² λ€μ κ°μ Έμλ λλ κ±°μλ€μγ
γ
γ
λ μ’μ΅λλ€ λ¬΄λ¦¬κ° λλ 쿼리λ μλ κ² κ°λ€μ!
outboxμ μ§λ ¬νλ κ°μΌλ‘ μ 보 λ€ μ μ₯ν λ, μ΄κ±° 리μ€νΈλ μ§μ§ μ½€λ§λ‘ ꡬλΆν΄μ μ μ₯ν΄μΌνλ... rdbλμ λ€λ₯Έ dbλ₯Ό κ³ λ €ν΄λ΄μΌνλνκ³ νΌμ μ¬κ°ν κ³ λ―Όνκ³ μμλλ° κ·Έλ₯.......μ΄λ κ² μ°Ύμμ€λ©΄ λλκ±°μλ€μ μ λμ°¬μ±μ λλ€
π Summary
757prκ³Ό κ°μ μν μ μ΄μ λμ μ½λ μΆκ°λ‘ ν΄κ²°ν μ μλ€κ³ μκ°νμ΅λλ€!
μλνλ©΄ μ ν¬λ λ¨μΌ λͺ¨λ ꡬ쑰μ΄κΈ° λλ¬Έ..!
κ·Έλμ μ κ° κ΅¬νν ν΄λΉ λ°©μμ΄
μΌλ°μ μΌλ‘ κ²μνλ©΄ λμ€λ transactional outbox patternκ³Όλ μ‘°κΈ λ€λ₯Ό μ μμ§λ§ μλ―Έλ λΉμ·νλ€κ³ μκ°ν΄μ.
μ΄λ ν ν¨ν΄μ΄λ κΈ°λ₯μ μ°¨μ©ν λμλ νμ¬ μν©μ νμ νκ³ κ·Έμ λ§κ² λ³νλ λ°©μμΌλ‘ μ μ©νλκ² κ°μ₯ μ€μνλ€κ³ μκ°ν©λλ€!
κ·Έλμ μ ν¬μ μλΉμ€ ꡬ쑰μμλ κ΅³μ΄ μ΄λ²€νΈ νκΉμ§ μΈ νμκ° μλ€κ³ νλ¨νꡬμ.
μ κ° κ΅¬νν λ°©μμμ λ°©μ§ν μ μλ λ¬Έμ μν©μ΄ μλ€λ©΄ 리뷰 λ¨κ²¨μ£ΌμΈμ!
ππ» More