From 9ab7fb3727415b59658a0a4aaf55845d87629d86 Mon Sep 17 00:00:00 2001 From: Johannes Kainz <johannes.kainz@student.uibk.ac.at> Date: Sat, 2 Apr 2022 09:04:20 +0200 Subject: [PATCH] changed @scheduled annotation and renamed method searchAll to searchAllPublicResults --- .../at/ac/uibk/gitsearch/service/MonitoringService.java | 6 +++--- .../java/at/ac/uibk/gitsearch/service/SearchService.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/at/ac/uibk/gitsearch/service/MonitoringService.java b/src/main/java/at/ac/uibk/gitsearch/service/MonitoringService.java index 545ec533a..862672e69 100644 --- a/src/main/java/at/ac/uibk/gitsearch/service/MonitoringService.java +++ b/src/main/java/at/ac/uibk/gitsearch/service/MonitoringService.java @@ -106,9 +106,9 @@ public class MonitoringService { /** * exports the monitoring relevant metrics regularly * <p></p> - * This is scheduled to get fired every minute (for testing reasons) + * This is scheduled to get fired hourly */ - @Scheduled(cron = "30 * * * * ?") + @Scheduled(cron = "0 30 * * * ?") public void exportMonitoringMetrics() { log.debug("Export monitoring relevant metrics"); @@ -289,7 +289,7 @@ public class MonitoringService { * @throws IOException exception for timeout etc. */ private SearchResultsDTO getAllSearchResults() throws IOException { - return this.searchService.searchAll(); + return this.searchService.searchAllPublicResults(); } /** diff --git a/src/main/java/at/ac/uibk/gitsearch/service/SearchService.java b/src/main/java/at/ac/uibk/gitsearch/service/SearchService.java index 6ee8ac60a..0065353ae 100644 --- a/src/main/java/at/ac/uibk/gitsearch/service/SearchService.java +++ b/src/main/java/at/ac/uibk/gitsearch/service/SearchService.java @@ -525,14 +525,14 @@ public class SearchService { } /** - * Method to search for all exercises with an empty search query - * and without a specified user. + * Method to search for all public exercises. + * Searches all public exercises with an empty search query and without a specified user. * * @return the search result page DTO * @throws IOException */ - public SearchResultsDTO searchAll() throws IOException { - log.debug("Search request to find all exercises"); + public SearchResultsDTO searchAllPublicResults() throws IOException { + log.debug("Search request to find all public exercises"); final SearchInputMetadataDTO emptySearchMetadata = new SearchInputMetadataDTO(null, null, null, null, null, null); SearchInputDTO emptySearchQuery = new SearchInputDTO(null, emptySearchMetadata, null, null, null, 0); -- GitLab