From fe7b6f2906d1bb5f5930700dce5967c9f53390d0 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Wed, 23 Feb 2022 20:55:22 +0100 Subject: [PATCH] Changed Tradeable update service frequency. --- .../nl/andrewl/coyotecredit/service/TradeableUpdateService.java | 2 +- src/main/java/nl/andrewl/coyotecredit/service/UserService.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java b/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java index 724b904..b87eb9c 100644 --- a/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java +++ b/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java @@ -46,7 +46,7 @@ public class TradeableUpdateService { updatePublicTradeables(); } - @Scheduled(cron = "@midnight") + @Scheduled(cron = "0 0 0,6,12,18 * * *") public void scheduledUpdate() { updatePublicTradeables(); } diff --git a/src/main/java/nl/andrewl/coyotecredit/service/UserService.java b/src/main/java/nl/andrewl/coyotecredit/service/UserService.java index 5aa481e..054d576 100644 --- a/src/main/java/nl/andrewl/coyotecredit/service/UserService.java +++ b/src/main/java/nl/andrewl/coyotecredit/service/UserService.java @@ -136,6 +136,7 @@ public class UserService { } @Scheduled(cron = "@midnight") + @Transactional public void removeExpiredActivationTokens() { activationTokenRepository.deleteAllByExpiresAtBefore(LocalDateTime.now(ZoneOffset.UTC)); }