From a779ac475b14b2c31e32ed6e71ca9a58f63a42b1 Mon Sep 17 00:00:00 2001 From: Gustav Berggren Date: Wed, 18 Oct 2023 16:46:59 +0200 Subject: [PATCH] Sett ttl til 10 min i spinnservice --- .../inntektsmelding/brospinn/SpinnService.kt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bro-spinn/src/main/kotlin/no/nav/helsearbeidsgiver/inntektsmelding/brospinn/SpinnService.kt b/bro-spinn/src/main/kotlin/no/nav/helsearbeidsgiver/inntektsmelding/brospinn/SpinnService.kt index fe28db598..349588040 100644 --- a/bro-spinn/src/main/kotlin/no/nav/helsearbeidsgiver/inntektsmelding/brospinn/SpinnService.kt +++ b/bro-spinn/src/main/kotlin/no/nav/helsearbeidsgiver/inntektsmelding/brospinn/SpinnService.kt @@ -35,7 +35,7 @@ private const val AVSENDER_NAV_NO = "NAV_NO" class SpinnService( private val rapid: RapidsConnection, override val redisStore: IRedisStore -) : CompositeEventListener(redisStore) { +) : CompositeEventListener(redisStore, ttl = 60 * 10) { private val logger = logger() private val sikkerLogger = sikkerLogger() @@ -52,10 +52,20 @@ class SpinnService( eventName = event, mainListener = it, rapidsConnection = rapid, - redisStore = redisStore + redisStore = redisStore, + ttl = 60 * 10 // 10 min + ) + } + withEventListener { + StatefullEventListener( + redisStore = redisStore, + event = event, + dataFelter = arrayOf(DataFelt.FORESPOERSEL_ID.str, DataFelt.SPINN_INNTEKTSMELDING_ID.str), + mainListener = it, + rapidsConnection = rapid, + ttl = 60 * 10 // 10 min ) } - withEventListener { StatefullEventListener(redisStore, event, arrayOf(DataFelt.FORESPOERSEL_ID.str, DataFelt.SPINN_INNTEKTSMELDING_ID.str), it, rapid) } } override fun dispatchBehov(message: JsonMessage, transaction: Transaction) {