Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
f Hvis dev, send melding på aiven-topic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jørgen Tu Sveli committed Aug 31, 2021
1 parent 1913200 commit 5310804
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,29 @@ class PubliseringAvEventsService(
// førstnevnte sin producer håndterer at melding med samme id overskrives hvis den er publisert fra før.
// Dette skjer pga. compaction-innstillingen definert i paw-iac repoet på github.
// Så hvis førstnevnte feiler forhindrer vi at duplikate meldinger skrives til sistnevnte.
arbeidssokerRegistrertProducer.publiserArbeidssokerRegistrert(
ArbeidssokerRegistrertInternalEvent(
bruker.aktorId,
ordinaerBrukerRegistrering.besvarelse,
ordinaerBrukerRegistrering.opprettetDato
)
)
ArbeidssokerRegistrertInternalEvent(
bruker.aktorId,
ordinaerBrukerRegistrering.besvarelse,
ordinaerBrukerRegistrering.opprettetDato
).also {
arbeidssokerRegistrertProducer.publiserArbeidssokerRegistrert(it)
if (System.getenv("APP_ENVIRONMENT_NAME") == "dev") {
try {
LOG.info("Producing message on aiven topic")
arbeidssokerRegistrertProducerAiven.publiserArbeidssokerRegistrert(it)
} catch (e: Exception) {
LOG.warn("Producing message on aiven topic FAILED with error {}", e)
}
}
}

arbeidssokerProfilertProducer.publiserProfilering(
bruker.aktorId,
profilering.innsatsgruppe,
ordinaerBrukerRegistrering.opprettetDato
)
}



private fun rapporterRegistreringStatusAntallForPublisering() {
try {
val antallPerStatus = registreringTilstandRepository.hentAntallPerStatus()
Expand Down

0 comments on commit 5310804

Please sign in to comment.