Skip to content

Commit

Permalink
MDC changes
Browse files Browse the repository at this point in the history
  • Loading branch information
srmontero committed Nov 12, 2020
1 parent d4d1fc9 commit 57fa3fa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public void run() {
log.info("CleanBatchJobExecutionRunner started");
cleanBatchJobService.cleanBatchJobExecution();
log.info("CleanBatchJobExecutionRunner finished");
MDC.remove(Constants.TRACKING);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public void run() {
}

log.info("DownloadDiagnosisKeysRunner finished");
MDC.remove(Constants.TRACKING);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
*/
package es.gob.radarcovid.efgs.runner;

import org.slf4j.MDC;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;

import es.gob.radarcovid.efgs.etc.Constants;
import lombok.NoArgsConstructor;

@NoArgsConstructor
Expand All @@ -20,6 +22,7 @@ public abstract class EfgsRunner implements ApplicationRunner {
@Override
public void run(ApplicationArguments args) throws Exception {
args.getNonOptionArgs().stream().filter(arg -> arg.equals(jobName())).findFirst().ifPresent(arg -> run());
MDC.remove(Constants.TRACKING);
}

public abstract String jobName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public void run() {
}

log.info("UploadDiagnosisKeysRunner finished");
MDC.remove(Constants.TRACKING);
}

}

0 comments on commit 57fa3fa

Please sign in to comment.