Commit 655a716b authored by Matija Obreza's avatar Matija Obreza
Browse files

Fetching PDCI #3

parent 7ca66193
......@@ -1684,7 +1684,7 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
@Override
@Cacheable(unless = "#result == null", value = "statistics", key = "'stats.' + #root.methodName + '-' + #faoInstitute.id")
public synchronized PDCIStatistics statisticsPDCI(FaoInstitute faoInstitute) {
public PDCIStatistics statisticsPDCI(FaoInstitute faoInstitute) {
PDCIStatistics stats = new PDCIStatistics();
Object[] overall = (Object[]) repoPdci.statistics(faoInstitute);
......
......@@ -81,7 +81,9 @@ public class StatisticsServiceImpl implements StatisticsService {
if (LOG.isDebugEnabled()) {
LOG.debug("Regenerating PDCI statistics for " + faoInstitute);
}
return genesysService.statisticsPDCI(faoInstitute);
synchronized (this) {
return genesysService.statisticsPDCI(faoInstitute);
}
}
@Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment