Skip to content

Commit

Permalink
Feature/slette hodejegeren (#3370)
Browse files Browse the repository at this point in the history
* Fjernet mn-synt-arbeidsforhold-service

* Fjerning av hodejegeren og hodejegeren-proxy
  • Loading branch information
krharum authored Jan 4, 2024
1 parent 780f145 commit 9e021ad
Show file tree
Hide file tree
Showing 191 changed files with 5 additions and 10,114 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/app.hodejegeren.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/app.mn-synt-arbeidsforhold-service.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/proxy.hodejegeren-proxy.yml

This file was deleted.

2 changes: 0 additions & 2 deletions apps/generer-arbeidsforhold-populasjon-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ spec:
- application: testnav-generer-organisasjon-populasjon-service
- application: testnav-organisasjon-service
- application: synthdata-amelding
external:
- host: testnav-hodejegeren-proxy.dev-fss-pub.nais.io
liveness:
path: /internal/isAlive
initialDelay: 4
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
public class Consumers {

private ServerProperties testnavGenererOrganisasjonPopulasjonService;
private ServerProperties testnavHodejegerenProxy;
private ServerProperties oppsummeringsdokumentService;
private ServerProperties testnavOrganisasjonService;
private ServerProperties syntAmelding;

}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.service.OrkestratorService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@Slf4j
@RestController
@RequiredArgsConstructor
Expand All @@ -20,16 +17,6 @@ public class GenererArbeidsforholdController {

private final OrkestratorService orkestratorService;

@PostMapping(value = "/populate")
public void populate(
@RequestHeader String miljo,
@RequestHeader Integer max,
@RequestParam("fom") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate fom,
@RequestParam("tom") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate tom
) {
orkestratorService.orkestrerUtenArbeidsforhold(max, miljo, fom, tom);
}

@PostMapping(value = "/develop")
public void populate(
@RequestHeader String miljo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.consumer.OppsummeringsdokumentConsumer;
import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.OppsummeringsdokumentDTO;
import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.PersonDTO;
import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.VirksomhetDTO;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;

import java.util.Collection;
import java.util.Set;
import java.util.stream.Collectors;

import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.adapter.TpsIdentAdapter;
import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.consumer.OppsummeringsdokumentConsumer;
import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.OppsummeringsdokumentDTO;
import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.PersonDTO;
import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.VirksomhetDTO;

@Slf4j
@Service
@RequiredArgsConstructor
public class IdentService {
private final OppsummeringsdokumentConsumer arbeidsforholdConsumer;
private final TpsIdentAdapter tpsIdentAdapter;

public Set<String> getIdenterMedArbeidsforhold(String miljo) {
var identer = arbeidsforholdConsumer
Expand All @@ -35,13 +31,4 @@ public Set<String> getIdenterMedArbeidsforhold(String miljo) {
log.info("Fant {} identer i {}.", identer.size(), miljo);
return identer;
}

public Flux<String> getIdenterUtenArbeidsforhold(String miljo, int max) {
var identer = tpsIdentAdapter.getIdenter(miljo, max);

var identerMedArbeidsforhold = getIdenterMedArbeidsforhold(miljo);

return identer.filter(ident -> !identerMedArbeidsforhold.contains(ident));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,16 @@
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;

import java.time.LocalDate;

@Service
@RequiredArgsConstructor
public class OrkestratorService {
private final IdentService identService;
private final PersonArbeidsforholdHistorkkService personArbeidsforholdHistorkkService;
private final OppsummeringsdokumentService oppsummeringsdokumentService;

public void orkestrerUtenArbeidsforhold(int max, String miljo, LocalDate fom, LocalDate tom) {
var identerUtenArbeidsforhold = identService.getIdenterUtenArbeidsforhold(miljo, max);
var personer = personArbeidsforholdHistorkkService.generer(identerUtenArbeidsforhold, miljo, fom, tom);
oppsummeringsdokumentService.save(personer, miljo);
}

public void orkestrerMedArbeidsforhold(String miljo, int months) {
var identerMedArbeidsforhold = identService.getIdenterMedArbeidsforhold(miljo);
var personer = personArbeidsforholdHistorkkService.generer(Flux.fromStream(identerMedArbeidsforhold.stream()), miljo, months);
oppsummeringsdokumentService.save(personer, miljo);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ consumers:
cluster: dev-gcp
namespace: dolly
name: synthdata-amelding
testnav-hodejegeren-proxy:
cluster: dev-fss
namespace: dolly
name: testnav-hodejegeren-proxy
url: https://testnav-hodejegeren-proxy.dev-fss-pub.nais.io
oppsummeringsdokument-service:
cluster: dev-gcp
namespace: dolly
Expand Down
2 changes: 0 additions & 2 deletions apps/generer-organisasjon-populasjon-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ spec:
cluster: dev-gcp
- application: testnav-oversikt-frontend
cluster: dev-gcp
- application: mn-synt-arbeidsforhold-service
cluster: dev-fss
- application: testnav-generer-arbeidsforhold-populasjon-service
cluster: dev-gcp
outbound:
Expand Down
8 changes: 0 additions & 8 deletions apps/hodejegeren/Dockerfile

This file was deleted.

26 changes: 0 additions & 26 deletions apps/hodejegeren/README.md

This file was deleted.

Loading

0 comments on commit 9e021ad

Please sign in to comment.