Skip to content

Commit

Permalink
Trying to fix leader election
Browse files Browse the repository at this point in the history
  • Loading branch information
kaja-nav committed Oct 3, 2023
1 parent e9e9bf3 commit 58f482e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 58f482e

Please sign in to comment.