Skip to content

Commit 2ca7ad1

Browse files
committed
Flyttet transaksjonsgrenser
1 parent 4ae0721 commit 2ca7ad1

File tree

1 file changed

+3
-3
lines changed
  • apps/min-side-varsler/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/service

1 file changed

+3
-3
lines changed

Diff for: apps/min-side-varsler/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/service/BestillingService.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,24 @@ class BestillingService(
6969
}
7070

7171
@WithSpan("prosesserBestillinger")
72-
fun prosesserBestillinger() = transaction {
72+
fun prosesserBestillinger() {
7373
val bestillinger = bestillingRepository.findByStatus(BestillingStatus.BEKREFTET)
7474
if (bestillinger.isEmpty()) {
7575
logger.info("Ingen ventende manuelle varselbestillinger funnet")
7676
} else {
7777
if (!applicationConfig.manuelleVarslerEnabled) {
7878
logger.warn("Utsendelse av manuelle varsler er deaktivert")
7979
}
80+
logger.info("Starter prosessering av {} manuelle varselbestillinger", bestillinger.size)
8081
bestillinger
8182
.map { UpdateBestillingRow(it.bestillingId, BestillingStatus.AKTIV) }
8283
.forEach { bestillingRepository.update(it) }
83-
logger.info("Starter prosessering av {} manuelle varselbestillinger", bestillinger.size)
8484
bestillinger.forEach { prosesserBestilling(it) }
8585
}
8686
}
8787

8888
@WithSpan("prosesserBestilling")
89-
private fun prosesserBestilling(bestilling: BestillingRow) {
89+
private fun prosesserBestilling(bestilling: BestillingRow) = transaction {
9090
val varslinger = bestiltVarselRepository.findByBestillingId(bestilling.bestillingId)
9191
logger.info(
9292
"Prosesserer {} varslinger for varselbestilling {}",

0 commit comments

Comments
 (0)