Skip to content

Commit

Permalink
fix snapshothandling
Browse files Browse the repository at this point in the history
  • Loading branch information
luechtdiode committed Feb 13, 2024
1 parent 4fbf6d8 commit 1fb39fb
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class CompetitionCoordinatorClientActor(wettkampfUUID: String) extends Persisten
state = state.updated(evt, isDNoteUsed)
if (!recoveryMode && lastSequenceNr % snapShotInterval == 0 && lastSequenceNr != 0) {
val criteria = SnapshotSelectionCriteria.Latest
saveSnapshot(state)
deleteSnapshots(criteria)
saveSnapshot(state)
deleteMessages(criteria.maxSequenceNr)
}
!state.equals(stateBefore)
Expand Down Expand Up @@ -318,8 +318,12 @@ class CompetitionCoordinatorClientActor(wettkampfUUID: String) extends Persisten
KuTuMailerActor.send(
MailTemplates.createDonateMail(wettkampf, donationLink, teilnehmer.size, price)
)
handleEvent(DonationMailSent(teilnehmer.size, price, donationLink, wettkampfUUID))
saveSnapshot(state)
} else {
handleEvent(DonationMailSent(0, BigDecimal(0), "", wettkampfUUID))
saveSnapshot(state)
}
handleEvent(DonationMailSent(0, BigDecimal(0), "", wettkampfUUID))
}
}

Expand Down

0 comments on commit 1fb39fb

Please sign in to comment.