[O] No blocking tasks on startup

pull/106/head
Azalea 2025-01-11 18:42:07 -05:00
parent 8eeac1f3ea
commit 9d05ef6808
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package icu.samnyan.aqua.sega.maimai2.handler
import com.querydsl.jpa.impl.JPAQueryFactory
import ext.logger
import ext.thread
import icu.samnyan.aqua.sega.general.BaseHandler
import icu.samnyan.aqua.sega.maimai2.model.userdata.QMai2UserPlaylog
import org.springframework.scheduling.annotation.Scheduled
@ -25,7 +26,7 @@ class GetGameRankingHandler(
init {
// To make sure the cache is initialized before the first request,
// not using `initialDelay = 0` in `@Scheduled`.
refreshMusicRankingCache()
thread { refreshMusicRankingCache() }
}
@Scheduled(fixedDelay = 3600_000)