Skip to content

Commit

Permalink
Sett ttl til 10 min i spinnservice
Browse files Browse the repository at this point in the history
  • Loading branch information
b162214 committed Oct 18, 2023
1 parent f410d54 commit a779ac4
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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) {
Expand Down

0 comments on commit a779ac4

Please sign in to comment.