Skip to content

Commit fb33a49

Browse files
committed
Merge branch 'master' into feature/team-logs
# Conflicts: # apps/dolly-backend/src/main/resources/logback-spring.xml
2 parents 4db1c38 + ae669e3 commit fb33a49

54 files changed

Lines changed: 466 additions & 591 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/fullmakt/FullmaktClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.List;
2121

2222
import static java.util.Objects.isNull;
23+
import static no.nav.dolly.domain.resultset.SystemTyper.FULLMAKT;
2324
import static no.nav.dolly.errorhandling.ErrorStatusDecoder.getInfoVenter;
2425
import static org.apache.http.util.TextUtils.isBlank;
2526

@@ -38,10 +39,10 @@ public Flux<ClientFuture> gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly
3839

3940
if (!bestilling.getFullmakt().isEmpty()) {
4041

42+
transactionHelperService.persister(progress, BestillingProgress::setFullmaktStatus,
43+
getInfoVenter(FULLMAKT.name()));
44+
4145
return Flux.fromIterable(bestilling.getFullmakt())
42-
.doOnNext(ordre ->
43-
transactionHelperService.persister(progress, BestillingProgress::setFullmaktStatus,
44-
getInfoVenter("Fullmakt (Representasjon)")))
4546
.flatMap(fullmakt -> {
4647
fullmakt.setFullmaktsgiver(dollyPerson.getIdent());
4748
if (isBlank(fullmakt.getFullmektig())) {

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/DollyBestillingService.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import no.nav.dolly.util.TransactionHelperService;
3535
import no.nav.testnav.libs.data.pdlforvalter.v1.PersonUpdateRequestDTO;
3636
import org.apache.commons.lang3.StringUtils;
37-
import org.slf4j.MDC;
3837
import org.springframework.stereotype.Service;
3938
import reactor.core.publisher.Flux;
4039

@@ -47,7 +46,6 @@
4746
import static java.util.Objects.isNull;
4847
import static java.util.Objects.nonNull;
4948
import static no.nav.dolly.domain.jpa.Testident.Master.PDL;
50-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
5149
import static org.apache.logging.log4j.util.Strings.isBlank;
5250
import static org.apache.logging.log4j.util.Strings.isNotBlank;
5351

@@ -183,7 +181,6 @@ protected void doFerdig(Bestilling bestilling) {
183181

184182
transactionHelperService.oppdaterBestillingFerdig(bestilling.getId(), bestillingService.cleanBestilling());
185183

186-
MDC.remove(MDC_KEY_BESTILLING);
187184
log.info("Bestilling med id=#{} er ferdig", bestilling.getId());
188185
}
189186

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettBestillingService.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,16 @@
1616
import no.nav.dolly.service.BestillingProgressService;
1717
import no.nav.dolly.service.BestillingService;
1818
import no.nav.dolly.service.IdentService;
19-
import no.nav.dolly.util.ThreadLocalContextLifter;
2019
import no.nav.dolly.util.TransactionHelperService;
2120
import no.nav.testnav.libs.reactivecore.web.WebClientError;
22-
import org.slf4j.MDC;
2321
import org.springframework.scheduling.annotation.Async;
2422
import org.springframework.stereotype.Service;
2523
import reactor.core.publisher.Flux;
26-
import reactor.core.publisher.Hooks;
27-
import reactor.core.publisher.Operators;
2824

2925
import java.util.List;
3026
import java.util.Objects;
3127

3228
import static java.util.Objects.nonNull;
33-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
3429

3530
@Slf4j
3631
@Service
@@ -71,9 +66,8 @@ public GjenopprettBestillingService(
7166

7267
@Async
7368
public void executeAsync(Bestilling bestilling) {
69+
7470
log.info("Bestilling med id=#{} og type={} er startet ...", bestilling.getId(), getBestillingType(bestilling));
75-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
76-
Hooks.onEachOperator(Operators.lift(new ThreadLocalContextLifter<>()));
7771

7872
var bestKriterier = getDollyBestillingRequest(bestilling);
7973
if (nonNull(bestKriterier)) {

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettGruppeService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,17 @@
1616
import no.nav.dolly.repository.IdentRepository.GruppeBestillingIdent;
1717
import no.nav.dolly.service.BestillingService;
1818
import no.nav.dolly.service.IdentService;
19-
import no.nav.dolly.util.ThreadLocalContextLifter;
2019
import no.nav.dolly.util.TransactionHelperService;
2120
import no.nav.testnav.libs.reactivecore.web.WebClientError;
22-
import org.slf4j.MDC;
2321
import org.springframework.scheduling.annotation.Async;
2422
import org.springframework.stereotype.Service;
2523
import reactor.core.publisher.Flux;
26-
import reactor.core.publisher.Hooks;
27-
import reactor.core.publisher.Operators;
2824

2925
import java.util.Comparator;
3026
import java.util.List;
3127
import java.util.Objects;
3228

3329
import static java.util.Objects.nonNull;
34-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
3530

3631
@Slf4j
3732
@Service
@@ -71,8 +66,6 @@ public GjenopprettGruppeService(
7166
public void executeAsync(Bestilling bestilling) {
7267

7368
log.info("Bestilling med id=#{} og type={} er startet ...", bestilling.getId(), getBestillingType(bestilling));
74-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
75-
Hooks.onEachOperator(Operators.lift(new ThreadLocalContextLifter<>()));
7669

7770
var bestKriterier = getDollyBestillingRequest(bestilling);
7871
if (nonNull(bestKriterier)) {

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettIdentService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,18 @@
1717
import no.nav.dolly.repository.IdentRepository.GruppeBestillingIdent;
1818
import no.nav.dolly.service.BestillingService;
1919
import no.nav.dolly.service.IdentService;
20-
import no.nav.dolly.util.ThreadLocalContextLifter;
2120
import no.nav.dolly.util.TransactionHelperService;
2221
import no.nav.testnav.libs.reactivecore.web.WebClientError;
23-
import org.slf4j.MDC;
2422
import org.springframework.scheduling.annotation.Async;
2523
import org.springframework.stereotype.Service;
2624
import reactor.core.publisher.Flux;
27-
import reactor.core.publisher.Hooks;
28-
import reactor.core.publisher.Operators;
2925

3026
import java.util.Comparator;
3127
import java.util.List;
3228
import java.util.Objects;
3329
import java.util.concurrent.atomic.AtomicInteger;
3430

3531
import static java.util.Objects.nonNull;
36-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
3732

3833
@Slf4j
3934
@Service
@@ -73,8 +68,6 @@ public GjenopprettIdentService(
7368
public void executeAsync(Bestilling bestilling) {
7469

7570
log.info("Bestilling med id=#{} og type={} er startet ...", bestilling.getId(), getBestillingType(bestilling));
76-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
77-
Hooks.onEachOperator(Operators.lift(new ThreadLocalContextLifter<>()));
7871

7972
RsDollyBestillingRequest bestKriterier = getDollyBestillingRequest(bestilling);
8073
if (nonNull(bestKriterier)) {

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/ImportAvPersonerFraPdlService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,16 @@
1515
import no.nav.dolly.metrics.CounterCustomRegistry;
1616
import no.nav.dolly.service.BestillingService;
1717
import no.nav.dolly.service.IdentService;
18-
import no.nav.dolly.util.ThreadLocalContextLifter;
1918
import no.nav.dolly.util.TransactionHelperService;
2019
import no.nav.testnav.libs.reactivecore.web.WebClientError;
21-
import org.slf4j.MDC;
2220
import org.springframework.scheduling.annotation.Async;
2321
import org.springframework.stereotype.Service;
2422
import reactor.core.publisher.Flux;
25-
import reactor.core.publisher.Hooks;
26-
import reactor.core.publisher.Operators;
2723

2824
import java.util.List;
2925

3026
import static java.util.Objects.nonNull;
3127
import static no.nav.dolly.domain.jpa.Testident.Master.PDL;
32-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
3328

3429
@Slf4j
3530
@Service
@@ -67,8 +62,6 @@ public ImportAvPersonerFraPdlService(IdentService identService,
6762
public void executeAsync(Bestilling bestilling) {
6863

6964
log.info("Bestilling med id=#{} og type={} er startet ...", bestilling.getId(), getBestillingType(bestilling));
70-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
71-
Hooks.onEachOperator(Operators.lift(new ThreadLocalContextLifter<>()));
7265

7366
RsDollyBestillingRequest bestKriterier = getDollyBestillingRequest(bestilling);
7467
if (nonNull(bestKriterier)) {

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/LeggTilPaaGruppeService.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,17 @@
1818
import no.nav.dolly.service.BestillingProgressService;
1919
import no.nav.dolly.service.BestillingService;
2020
import no.nav.dolly.service.IdentService;
21-
import no.nav.dolly.util.ThreadLocalContextLifter;
2221
import no.nav.dolly.util.TransactionHelperService;
2322
import no.nav.testnav.libs.data.pdlforvalter.v1.PersonUpdateRequestDTO;
2423
import no.nav.testnav.libs.reactivecore.web.WebClientError;
2524
import org.apache.commons.lang3.StringUtils;
26-
import org.slf4j.MDC;
2725
import org.springframework.scheduling.annotation.Async;
2826
import org.springframework.stereotype.Service;
2927
import reactor.core.publisher.Flux;
30-
import reactor.core.publisher.Hooks;
31-
import reactor.core.publisher.Operators;
3228

3329
import java.util.List;
3430

3531
import static java.util.Objects.nonNull;
36-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
3732

3833
@Slf4j
3934
@Service
@@ -74,9 +69,6 @@ public LeggTilPaaGruppeService(
7469
@Async
7570
public void executeAsync(Bestilling bestilling) {
7671

77-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
78-
Hooks.onEachOperator(Operators.lift(new ThreadLocalContextLifter<>()));
79-
8072
RsDollyBestillingRequest bestKriterier = getDollyBestillingRequest(bestilling);
8173
if (nonNull(bestKriterier)) {
8274

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/OppdaterPersonService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@
2020
import no.nav.dolly.util.TransactionHelperService;
2121
import no.nav.testnav.libs.reactivecore.web.WebClientError;
2222
import org.apache.commons.lang3.StringUtils;
23-
import org.slf4j.MDC;
2423
import org.springframework.scheduling.annotation.Async;
2524
import org.springframework.stereotype.Service;
2625
import reactor.core.publisher.Flux;
2726

2827
import java.util.List;
2928

30-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
31-
3229
@Slf4j
3330
@Service
3431
public class OppdaterPersonService extends DollyBestillingService {
@@ -69,7 +66,6 @@ public OppdaterPersonService(
6966
public void oppdaterPersonAsync(RsDollyUpdateRequest request, Bestilling bestilling) {
7067

7168
log.info("Bestilling med id=#{} med type={} er startet ...", bestilling.getId(), getBestillingType(bestilling));
72-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
7369
request.setId(bestilling.getId());
7470

7571
var testident = identService.getTestIdent(bestilling.getIdent());

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/OpprettPersonerByKriterierService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,17 @@
1414
import no.nav.dolly.metrics.CounterCustomRegistry;
1515
import no.nav.dolly.service.BestillingService;
1616
import no.nav.dolly.service.IdentService;
17-
import no.nav.dolly.util.ThreadLocalContextLifter;
1817
import no.nav.dolly.util.TransactionHelperService;
1918
import no.nav.testnav.libs.reactivecore.web.WebClientError;
2019
import org.apache.commons.lang3.StringUtils;
21-
import org.slf4j.MDC;
2220
import org.springframework.scheduling.annotation.Async;
2321
import org.springframework.stereotype.Service;
2422
import reactor.core.publisher.Flux;
25-
import reactor.core.publisher.Hooks;
26-
import reactor.core.publisher.Operators;
2723

2824
import java.util.List;
2925

3026
import static java.util.Objects.nonNull;
3127
import static no.nav.dolly.domain.jpa.Testident.Master.PDLF;
32-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
3328

3429
@Slf4j
3530
@Service
@@ -68,8 +63,6 @@ public OpprettPersonerByKriterierService(
6863
public void executeAsync(Bestilling bestilling) {
6964

7065
log.info("Bestilling med id=#{} og type={} er startet i miljøer {} ...", bestilling.getId(), getBestillingType(bestilling), bestilling.getMiljoer());
71-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
72-
Hooks.onEachOperator(Operators.lift(new ThreadLocalContextLifter<>()));
7366

7467
var bestKriterier = getDollyBestillingRequest(bestilling);
7568
if (nonNull(bestKriterier)) {

apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/OpprettPersonerFraIdenterMedKriterierService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,17 @@
1515
import no.nav.dolly.metrics.CounterCustomRegistry;
1616
import no.nav.dolly.service.BestillingService;
1717
import no.nav.dolly.service.IdentService;
18-
import no.nav.dolly.util.ThreadLocalContextLifter;
1918
import no.nav.dolly.util.TransactionHelperService;
2019
import no.nav.testnav.libs.reactivecore.web.WebClientError;
2120
import org.apache.commons.lang3.StringUtils;
22-
import org.slf4j.MDC;
2321
import org.springframework.scheduling.annotation.Async;
2422
import org.springframework.stereotype.Service;
2523
import reactor.core.publisher.Flux;
26-
import reactor.core.publisher.Hooks;
27-
import reactor.core.publisher.Operators;
2824

2925
import java.util.List;
3026

3127
import static java.util.Objects.nonNull;
3228
import static no.nav.dolly.domain.jpa.Testident.Master.PDLF;
33-
import static no.nav.dolly.util.MdcUtil.MDC_KEY_BESTILLING;
3429

3530
@Slf4j
3631
@Service
@@ -69,8 +64,6 @@ public OpprettPersonerFraIdenterMedKriterierService(
6964
public void executeAsync(Bestilling bestilling) {
7065

7166
log.info("Bestilling med id=#{} og type={} er startet ...", bestilling.getId(), getBestillingType(bestilling));
72-
MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString());
73-
Hooks.onEachOperator(Operators.lift(new ThreadLocalContextLifter<>()));
7467

7568
RsDollyBestillingRequest bestKriterier = getDollyBestillingRequest(bestilling);
7669
if (nonNull(bestKriterier)) {

0 commit comments

Comments
 (0)