From 58f482e0fb28c919baa041df30a5a18c88721682 Mon Sep 17 00:00:00 2001 From: Kaja Kvinge Akselsen Date: Tue, 3 Oct 2023 09:50:12 +0200 Subject: [PATCH] Trying to fix leader election --- .../no/nav/syfo/leaderelection/LeaderElectionClient.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/no/nav/syfo/leaderelection/LeaderElectionClient.kt b/src/main/kotlin/no/nav/syfo/leaderelection/LeaderElectionClient.kt index ec2f2e38..a1d7ca80 100644 --- a/src/main/kotlin/no/nav/syfo/leaderelection/LeaderElectionClient.kt +++ b/src/main/kotlin/no/nav/syfo/leaderelection/LeaderElectionClient.kt @@ -1,6 +1,5 @@ package no.nav.syfo.leaderelection -import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.databind.DeserializationFeature import com.fasterxml.jackson.databind.ObjectMapper import no.nav.syfo.metric.Metric @@ -49,8 +48,10 @@ class LeaderElectionClient @Inject constructor( return hostName == leader.name } - @JsonIgnoreProperties(ignoreUnknown = true) - private data class Leader(val name: String) + private data class Leader( + val name: String, + val lastUpdate: String, + ) companion object { private val log = LoggerFactory.getLogger(LeaderElectionClient::class.java)