mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-17 11:19:15 +00:00
Merge branch 'eclipse-main' into bug6226
This commit is contained in:
+10
-1
@@ -126,7 +126,16 @@ public class QuickRanksLiveCache {
|
||||
}
|
||||
|
||||
public QuickRanksDTO get(RegattaAndRaceIdentifier raceIdentifier) {
|
||||
QuickRanksDTO result = cache.get(raceIdentifier, false);
|
||||
// The following may throw an exception that was stored upon an earlier re-compute attempt;
|
||||
// see also the changes of bug6245, so we need to recompute if we read null or if
|
||||
// we get an exception
|
||||
QuickRanksDTO result = null;
|
||||
try {
|
||||
result = cache.get(raceIdentifier, false);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.WARNING, "Exception while reading QuickRanksCache for race "+raceIdentifier
|
||||
+ "; re-computing");
|
||||
}
|
||||
if (result == null) {
|
||||
final TrackedRace trackedRace = service.getExistingTrackedRace(raceIdentifier);
|
||||
if (trackedRace != null) {
|
||||
|
||||
+11
-2
@@ -17,6 +17,7 @@ import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
@@ -398,9 +399,17 @@ public class SimulationServiceImpl implements SimulationService {
|
||||
|
||||
@Override
|
||||
public SimulationResults getSimulationResults(LegIdentifier legIdentifier) {
|
||||
SimulationResults result = cache.get(legIdentifier, false);
|
||||
SimulationResults result = null;
|
||||
try {
|
||||
result = cache.get(legIdentifier, false);
|
||||
if (result == null) {
|
||||
logger.fine("Simulation Get: Cache Empty: \"" + legIdentifier.toString() + "\"");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.WARNING, "Exception trying to get simulation results for "+legIdentifier+
|
||||
"; re-calculating", e);
|
||||
}
|
||||
if (result == null) {
|
||||
logger.fine("Simulation Get: Cache Empty: \"" + legIdentifier.toString() + "\"");
|
||||
if (!raceListeners.containsKey(legIdentifier.getRegattaName())) {
|
||||
final Regatta regatta = racingEventService.getRegattaByName(legIdentifier.getRegattaName());
|
||||
final DynamicTrackedRegatta trackedRegatta = racingEventService.getTrackedRegatta(regatta);
|
||||
|
||||
Reference in New Issue
Block a user