From b4f91f188ead7af3bed84a46cb0f7d41c8a82fea Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Thu, 14 Sep 2023 12:08:33 +0300 Subject: [PATCH] Fix the "retries-num" appearing in log-messages. --- .../openaire/urls_controller/services/StatsServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java b/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java index 2d497c4..ef0da24 100644 --- a/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java +++ b/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java @@ -27,7 +27,7 @@ public class StatsServiceImpl implements StatsService { public ResponseEntity getNumberOfPayloads(String getNumberQuery, String message, int retryCount) { if ( retryCount > 10 ) { - String errorMsg = "Could not find the requested payload-type table in an non-merging state, after " + retryCount + " retries!"; + String errorMsg = "Could not find the requested payload-type table in an non-merging state, after " + (retryCount -1) + " retries!"; logger.error(errorMsg); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMsg); } @@ -59,7 +59,7 @@ public class StatsServiceImpl implements StatsService { public ResponseEntity getNumberOfRecordsInspectedByServiceThroughCrawling(int retryCount) { if ( retryCount > 10 ) { - String errorMsg = "Could not find the requested attempt table in an non-merging state, after " + retryCount + " retries!"; + String errorMsg = "Could not find the requested attempt table in an non-merging state, after " + (retryCount -1) + " retries!"; logger.error(errorMsg); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMsg); }