Skip to content

Commit

Permalink
Backtrack
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-meidell committed Oct 31, 2024
1 parent 5e3a19f commit 6de5c7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class TaskConfig {
godskrivOpptjeningProcessingTask: GodskrivOpptjeningProcessingTask
): ExecutorService {
return Executors.newVirtualThreadPerTaskExecutor().also { executor ->
repeat(1) { executor.submit(oppgaveProcessingTask) }
repeat(1) { executor.submit(brevProcessingTask) }
repeat(4) { executor.submit(persongrunnlagMeldingProcessingTask) }
repeat(8) { executor.submit(kontrollbehandlingProcessingTask) }
repeat(1) { executor.submit(godskrivOpptjeningProcessingTask) }
repeat(0) { executor.submit(oppgaveProcessingTask) }
repeat(0) { executor.submit(brevProcessingTask) }
repeat(0) { executor.submit(persongrunnlagMeldingProcessingTask) }
repeat(16) { executor.submit(kontrollbehandlingProcessingTask) }
repeat(0) { executor.submit(godskrivOpptjeningProcessingTask) }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ internal class KontrollbehandlingProcessingServiceImpl(

override fun process(): List<FullførteBehandlinger>? {
val meldinger = transactionTemplate.execute { service.hentOgLås(10) }!!
try {
return meldinger.rader.mapNotNull { melding ->
return try {
meldinger.rader.mapNotNull { melding ->
Mdc.scopedMdc(CorrelationId(melding.kontrollId)) {
Mdc.scopedMdc(InnlesingId(melding.kontrollId)) {
try {
Expand All @@ -40,11 +40,11 @@ internal class KontrollbehandlingProcessingServiceImpl(
}
}
}
}
}.ifEmpty { null }
} catch (ex: Throwable) {
log.error("Exception ved henting kontrollbehandlinger ${ex::class.qualifiedName}")
secureLog.error("Exception ved henting kontrollbehandlinger", ex)
return null // throw ex
log.error("Exception ved behandling av kontrollbehandlinger ${ex::class.qualifiedName}")
secureLog.error("Exception ved behandling av kontrollbehandlinger", ex)
null
} finally {
transactionTemplate.execute { service.frigi(meldinger) }
}
Expand Down

0 comments on commit 6de5c7e

Please sign in to comment.