Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assign repository før service legges til i processors #803

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

kenglxn
Copy link
Contributor

@kenglxn kenglxn commented Dec 9, 2024

i noen tilfeller blir service metrikk pollet før repoet faktisk var instansiert. Dette medførte en nullpointer.
Endrer koden slik at det blir litt mer tydelig at intensjonen er at repoet skal være instansiert før service er klar til prosessering.

java.lang.NullPointerException: Cannot invoke "no.nav.arbeidsgiver.notifikasjon.replay_validator.ReplayValidatorRepository.findNotifikasjonCreatesAfterHardDeleteSak()" because "this.repository" is null
	at no.nav.arbeidsgiver.notifikasjon.replay_validator.ReplayValidatorService.updateMetrics(ReplayValidatorService.kt:93)
	at no.nav.arbeidsgiver.notifikasjon.replay_validator.ReplayValidator$main$1$2.invokeSuspend(ReplayValidator.kt:36)
	at no.nav.arbeidsgiver.notifikasjon.replay_validator.ReplayValidator$main$1$2.invoke(ReplayValidator.kt)
	at no.nav.arbeidsgiver.notifikasjon.replay_validator.ReplayValidator$main$1$2.invoke(ReplayValidator.kt)
	at no.nav.arbeidsgiver.notifikasjon.infrastruktur.ProcessingLoopKt$launchProcessingLoop$2.invokeSuspend(ProcessingLoop.kt:27)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)

@kenglxn kenglxn requested a review from a team as a code owner December 9, 2024 20:07
@kenglxn kenglxn merged commit de04a1c into main Dec 9, 2024
6 checks passed
@kenglxn kenglxn deleted the fix_npex_replay_validator branch December 9, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant