Disable sending emails about compliance failure. #5
|
@ -39,7 +39,9 @@ public class InterfaceComplianceService {
|
||||||
@Scheduled(cron = "0 0 0 * * *") // every day at 00:00
|
@Scheduled(cron = "0 0 0 * * *") // every day at 00:00
|
||||||
public void cleanUp() {
|
public void cleanUp() {
|
||||||
Set<InterfaceComplianceRequest> requests = getOutdated();
|
Set<InterfaceComplianceRequest> requests = getOutdated();
|
||||||
for (InterfaceComplianceRequest request : requests) {
|
|
||||||
|
// TODO - In case we want to send the emails, uncomment the following code.
|
||||||
|
/*for (InterfaceComplianceRequest request : requests) {
|
||||||
try {
|
try {
|
||||||
Map<String, RepositoryInterface> repositoryInterfaceMap = repositoryService.getRepositoryInterface(request.getRepositoryId())
|
Map<String, RepositoryInterface> repositoryInterfaceMap = repositoryService.getRepositoryInterface(request.getRepositoryId())
|
||||||
.stream()
|
.stream()
|
||||||
|
@ -52,7 +54,8 @@ public class InterfaceComplianceService {
|
||||||
} catch (ResourceNotFoundException e) {
|
} catch (ResourceNotFoundException e) {
|
||||||
logger.error("Error", e);
|
logger.error("Error", e);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
repository.deleteAll(requests);
|
repository.deleteAll(requests);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue