diff --git a/nais-dev.yaml b/nais-dev.yaml index 62415f2..d39d868 100644 --- a/nais-dev.yaml +++ b/nais-dev.yaml @@ -14,13 +14,13 @@ spec: liveness: path: /isAlive port: 8080 - initialDelay: 999999 - timeout: 99999 + initialDelay: 20 + timeout: 20 readiness: path: /isReady port: 8080 - initialDelay: 99999 - timeout: 99999 + initialDelay: 20 + timeout: 20 replicas: min: 1 max: 1 diff --git a/src/main/kotlin/no/nav/fo/veilarbvarsel/main.kt b/src/main/kotlin/no/nav/fo/veilarbvarsel/main.kt index 7b691e3..5000606 100644 --- a/src/main/kotlin/no/nav/fo/veilarbvarsel/main.kt +++ b/src/main/kotlin/no/nav/fo/veilarbvarsel/main.kt @@ -7,6 +7,7 @@ import io.ktor.jackson.* import io.ktor.server.engine.* import io.ktor.server.netty.* import no.nav.fo.veilarbvarsel.config.ApplicationContext +import no.nav.fo.veilarbvarsel.config.system.features.BackgroundJob import no.nav.fo.veilarbvarsel.config.system.healthModule import org.slf4j.LoggerFactory @@ -31,9 +32,9 @@ fun Application.mainModule(appContext: ApplicationContext = ApplicationContext() } } -// install(BackgroundJob.BackgroundJobFeature("Events Consumer")) { -// job = appContext.eventConsumer -// } + install(BackgroundJob.BackgroundJobFeature("Events Consumer")) { + job = appContext.eventConsumer + } - appContext.eventConsumer.run() +// appContext.eventConsumer.run() }