fixed future handling in message cache, so methods return futures instead of requiring them as parameters

and adapted the code using this
fixed config loading still relying on double, where the values were changed to long
This commit is contained in:
Sheldan
2020-05-12 09:32:18 +02:00
parent 1634f5e9cc
commit 8d8f735672
7 changed files with 31 additions and 32 deletions

View File

@@ -111,8 +111,8 @@ public class WarnServiceBean implements WarnService {
@Override
@Transactional
public void decayWarningsForServer(AServer server) {
Double days = configService.getDoubleValue("decayDays", server.getId());
Instant cutOffDay = Instant.now().minus(days.longValue(), ChronoUnit.DAYS);
Long days = configService.getLongValue("decayDays", server.getId());
Instant cutOffDay = Instant.now().minus(days, ChronoUnit.DAYS);
List<Warning> warningsToDecay = warnManagementService.getActiveWarningsInServerOlderThan(server, cutOffDay);
decayWarnings(warningsToDecay);
logDecayedWarnings(server, warningsToDecay);