From 40c1a61d6367eac875d7d3d1160c1b3bb0fb011e Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Thu, 26 Oct 2023 13:06:07 +0300 Subject: [PATCH] Improve documentation. --- README.md | 4 ++-- .../pdf_aggregation_statistics/services/StatsServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 01f4d5a..4fdd683 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ This is a public API to get specific statistics from the PDF Aggregation Service.
This service is designed to respond as fast as possible, by caching the relevant data in memory, instead of running new queries to the database, for every request. -**The cached data is updated every 6 hours**. +**The cached data is updated every 6 hours**, by default.
+It is possible to configure the "**cacheUpdateInterval**" value inside the [__application.yml__](https://code-repo.d4science.org/lsmyrnaios/pdf-aggregation-statistics/src/branch/master/src/main/resources/application.yml) file.

@@ -12,7 +13,6 @@ This service is designed to respond as fast as possible, by caching the relevant

- **To install and run the application**: - Run ```git clone``` and then ```cd pdf_aggregation_statistics```. - Set the preferable values inside the [__application.yml__](https://code-repo.d4science.org/lsmyrnaios/pdf-aggregation-statistics/src/branch/master/src/main/resources/application.yml) file. diff --git a/src/main/java/eu/openaire/pdf_aggregation_statistics/services/StatsServiceImpl.java b/src/main/java/eu/openaire/pdf_aggregation_statistics/services/StatsServiceImpl.java index dab49cf..de2e19a 100644 --- a/src/main/java/eu/openaire/pdf_aggregation_statistics/services/StatsServiceImpl.java +++ b/src/main/java/eu/openaire/pdf_aggregation_statistics/services/StatsServiceImpl.java @@ -74,7 +74,7 @@ public class StatsServiceImpl implements StatsService { logger.error("No value was able to be retrieved from one of the columns of row_" + rs.getRow(), sqle); } }); - logger.info("The \"datasourcesWithNumOfPayloads\" map was " + (SchedulingTasks.runningFirstTime ? "populated with the payload-numbers for " + datasourcesWithNumOfPayloads.size() + " datasources." : ("updated. " + countNewDatasources[0] + " new datasources were added and " + countUpdatedDatasources[0] + " were updated. The number of added payloads is " + countAddedPayloads[0]))); + logger.info("The \"datasourcesWithNumOfPayloads\" map was " + (SchedulingTasks.runningFirstTime ? "populated with the payload-numbers for " + datasourcesWithNumOfPayloads.size() + " datasources." : ("updated. " + countNewDatasources[0] + " new datasources were added and " + countUpdatedDatasources[0] + " were updated. The number of added payloads is " + countAddedPayloads[0] + "."))); return true; } catch (EmptyResultDataAccessException erdae) { logger.error("The number of payloads per datasource could not be retrieved from the database \"" + databaseName + "\" using the getNumberOfPayloadsPerDatasourceQuery: " + getNumberOfPayloadsPerDatasourceQuery);