Skip to content

Commit

Permalink
Delete maxdate api (#602)
Browse files Browse the repository at this point in the history
* Delete API

* Delete consumers of spleis and infotrygd. Delete DAO. Delet MerVeiledningVarselFinder.  Drop spleis and infotrygd tables.

* Drop view UTBETALINGER;

* Fix tests

* Delete PlanlagtVarselDAO and PPlanlagtVarsel
  • Loading branch information
Vitenok authored Nov 18, 2024
1 parent c86de80 commit 38e399a
Show file tree
Hide file tree
Showing 35 changed files with 31 additions and 1,876 deletions.
21 changes: 0 additions & 21 deletions nais/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,3 @@ spec:
labels:
namespace: team-esyfo
severity: warning
- alert: KAFKA INFOTRYGD CONSUMER LAG
expr: kafka_consumergroup_group_topic_sum_lag{topic="aap.sykepengedager.infotrygd.v1", group="esyfovarsel-group-infotrygd-01"} > 0
for: 15m
annotations:
summary: "esyfovarsel har ukonsumerte Kafkameldinger på topic aap.sykepengedager.infotrygd.v1"
action: "Finn ut hvorfor esyfovarsel har stoppet å konsumere fra topic"
labels:
namespace: team-esyfo
severity: warning
- alert: KAFKA UTBETALING CONSUMER LAG
expr: kafka_consumergroup_group_topic_sum_lag{topic="flex.ditt-sykefravaer-melding", group="esyfovarsel-group-utbetaling-spleis-01"} > 0
for: 15m
annotations:
summary: "esyfovarsel har ukonsumerte Kafkameldinger på topic tbd.utbetaling"
action: "Finn ut hvorfor esyfovarsel har stoppet å konsumere fra topic"
labels:
namespace: team-esyfo
severity: warning



41 changes: 0 additions & 41 deletions src/main/kotlin/no/nav/syfo/BootstrapApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,13 @@ import no.nav.syfo.consumer.distribuerjournalpost.JournalpostdistribusjonConsume
import no.nav.syfo.consumer.dkif.DkifConsumer
import no.nav.syfo.consumer.narmesteLeder.NarmesteLederConsumer
import no.nav.syfo.consumer.narmesteLeder.NarmesteLederService
import no.nav.syfo.consumer.pdl.PdlConsumer
import no.nav.syfo.consumer.syfosmregister.SykmeldingerConsumer
import no.nav.syfo.consumer.veiledertilgang.VeilederTilgangskontrollConsumer
import no.nav.syfo.db.Database
import no.nav.syfo.db.DatabaseInterface
import no.nav.syfo.db.grantAccessToIAMUsers
import no.nav.syfo.job.closeExpiredMicrofrontendsJob
import no.nav.syfo.kafka.common.launchKafkaListener
import no.nav.syfo.kafka.consumers.infotrygd.InfotrygdKafkaConsumer
import no.nav.syfo.kafka.consumers.testdata.reset.TestdataResetConsumer
import no.nav.syfo.kafka.consumers.utbetaling.UtbetalingKafkaConsumer
import no.nav.syfo.kafka.consumers.varselbus.VarselBusKafkaConsumer
import no.nav.syfo.kafka.producers.brukernotifikasjoner.BrukernotifikasjonKafkaProducer
import no.nav.syfo.kafka.producers.dinesykmeldte.DineSykmeldteHendelseKafkaProducer
Expand All @@ -61,7 +57,6 @@ import no.nav.syfo.service.MerVeiledningVarselService
import no.nav.syfo.service.MotebehovVarselService
import no.nav.syfo.service.OppfolgingsplanVarselService
import no.nav.syfo.service.SenderFacade
import no.nav.syfo.service.SykepengerMaxDateService
import no.nav.syfo.service.SykmeldingService
import no.nav.syfo.service.TestdataResetService
import no.nav.syfo.service.VarselBusService
Expand Down Expand Up @@ -108,7 +103,6 @@ fun createEngineEnvironment(): ApplicationEngineEnvironment = applicationEngineE
database.grantAccessToIAMUsers()

val azureAdTokenConsumer = AzureAdTokenConsumer(env.authEnv)
val pdlConsumer = getPdlConsumer(env.urlEnv, azureAdTokenConsumer)
val dkifConsumer = getDkifConsumer(env.urlEnv, azureAdTokenConsumer)
val sykmeldingerConsumer = SykmeldingerConsumer(env.urlEnv, azureAdTokenConsumer)
val narmesteLederConsumer = NarmesteLederConsumer(env.urlEnv, azureAdTokenConsumer)
Expand Down Expand Up @@ -163,7 +157,6 @@ fun createEngineEnvironment(): ApplicationEngineEnvironment = applicationEngineE
val manglendeMedvirkningVarselService = ManglendeMedvirkningVarselService(senderFacade)
val oppfolgingsplanVarselService =
OppfolgingsplanVarselService(senderFacade, accessControlService, env.urlEnv.oppfolgingsplanerUrl)
val sykepengerMaxDateService = SykepengerMaxDateService(database, pdlConsumer)
val merVeiledningVarselService = MerVeiledningVarselService(
senderFacade = senderFacade,
env = env,
Expand Down Expand Up @@ -195,9 +188,6 @@ fun createEngineEnvironment(): ApplicationEngineEnvironment = applicationEngineE
merVeiledningVarselService
)

val veilederTilgangskontrollConsumer =
VeilederTilgangskontrollConsumer(env.urlEnv, azureAdTokenConsumer)

val testdataResetService = TestdataResetService(database, mikrofrontendService, senderFacade)

connector {
Expand All @@ -209,27 +199,17 @@ fun createEngineEnvironment(): ApplicationEngineEnvironment = applicationEngineE

serverModule(
env,
sykepengerMaxDateService,
mikrofrontendService,
veilederTilgangskontrollConsumer,
)

kafkaModule(
env,
varselBusService,
sykepengerMaxDateService,
testdataResetService,
)
}
}

private fun getPdlConsumer(urlEnv: UrlEnv, azureADConsumer: AzureAdTokenConsumer): PdlConsumer {
return when {
isLocal() -> PdlConsumer.LocalPdlConsumer(urlEnv, azureADConsumer)
else -> PdlConsumer(urlEnv, azureADConsumer)
}
}

private fun getDkifConsumer(urlEnv: UrlEnv, azureADConsumer: AzureAdTokenConsumer): DkifConsumer {
return when {
isLocal() -> DkifConsumer(urlEnv, azureADConsumer)
Expand All @@ -239,9 +219,7 @@ private fun getDkifConsumer(urlEnv: UrlEnv, azureADConsumer: AzureAdTokenConsume

fun Application.serverModule(
env: Environment,
sykepengerMaxDateService: SykepengerMaxDateService,
mikrofrontendService: MikrofrontendService,
veilederTilgangskontrollConsumer: VeilederTilgangskontrollConsumer,
) {
install(ContentNegotiation) {
jackson {
Expand All @@ -265,17 +243,13 @@ fun Application.serverModule(
runningRemotely {
setupRoutesWithAuthentication(
mikrofrontendService,
sykepengerMaxDateService,
veilederTilgangskontrollConsumer,
env.authEnv,
)
}

runningLocally {
setupLocalRoutesWithAuthentication(
mikrofrontendService,
sykepengerMaxDateService,
veilederTilgangskontrollConsumer,
env.authEnv,
)
}
Expand All @@ -291,24 +265,9 @@ fun Application.serverModule(
fun Application.kafkaModule(
env: Environment,
varselbusService: VarselBusService,
sykepengerMaxDateService: SykepengerMaxDateService,
testdataResetService: TestdataResetService,
) {
runningRemotely {
launch(backgroundTasksContext) {
launchKafkaListener(
state,
InfotrygdKafkaConsumer(env, sykepengerMaxDateService),
)
}

launch(backgroundTasksContext) {
launchKafkaListener(
state,
UtbetalingKafkaConsumer(env, sykepengerMaxDateService),
)
}

launch(backgroundTasksContext) {
launchKafkaListener(
state,
Expand Down

This file was deleted.

This file was deleted.

62 changes: 0 additions & 62 deletions src/main/kotlin/no/nav/syfo/api/maxdate/SykepengerMaxDateRest.kt

This file was deleted.

Loading

0 comments on commit 38e399a

Please sign in to comment.