Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Flytt toggle til ytterste while-løkke
Browse files Browse the repository at this point in the history
  • Loading branch information
marenger committed Jan 26, 2023
1 parent 275e7b2 commit 811c714
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PopulerAktorIdWorker(
val EN_MILLION = 1000000
var foedselsnummer =
formidlingsgruppeRepository.hentFoedselsnummerIBolk(foedselsnummerOffset, EN_MILLION).distinct()
while (foedselsnummer.isNotEmpty()) {
while (foedselsnummer.isNotEmpty() && unleashClient.isEnabled("veilarbregistrering.populere-aktorid")) {
populerAktørIdForBolk(foedselsnummer, foedselsnummerOffset)
logger.info("Har hentet og oppdatert aktørId for offset $foedselsnummerOffset")

Expand All @@ -52,7 +52,7 @@ class PopulerAktorIdWorker(
private fun populerAktørIdForBolk(fnr: List<Foedselsnummer>, offset: Int) {
var teller = 1
var foedselsnummer = fnr
while (foedselsnummer.isNotEmpty() && unleashClient.isEnabled("veilarbregistrering.populere-aktorid")) {
while (foedselsnummer.isNotEmpty()) {
val foedselsnummerBolk = foedselsnummer.take(100)
foedselsnummer = foedselsnummer.drop(100)

Expand Down

0 comments on commit 811c714

Please sign in to comment.