Improve documentation.

This commit is contained in:
Lampros Smyrnaios 2023-10-26 13:06:07 +03:00
parent 0ce5c98a7e
commit 40c1a61d63
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,8 @@
This is a public API to get specific statistics from the PDF Aggregation Service.<br> This is a public API to get specific statistics from the PDF Aggregation Service.<br>
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. 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.<br>
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.
<br> <br>
<br> <br>
@ -12,7 +13,6 @@ This service is designed to respond as fast as possible, by caching the relevant
<br> <br>
<br> <br>
**To install and run the application**: **To install and run the application**:
- Run ```git clone``` and then ```cd pdf_aggregation_statistics```. - 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. - 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.

View File

@ -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.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; return true;
} catch (EmptyResultDataAccessException erdae) { } catch (EmptyResultDataAccessException erdae) {
logger.error("The number of payloads per datasource could not be retrieved from the database \"" + databaseName + "\" using the getNumberOfPayloadsPerDatasourceQuery: " + getNumberOfPayloadsPerDatasourceQuery); logger.error("The number of payloads per datasource could not be retrieved from the database \"" + databaseName + "\" using the getNumberOfPayloadsPerDatasourceQuery: " + getNumberOfPayloadsPerDatasourceQuery);