mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 14:27:28 +08:00
[O] No blocking tasks on startup
This commit is contained in:
@@ -2,6 +2,7 @@ package icu.samnyan.aqua.sega.maimai2.handler
|
|||||||
|
|
||||||
import com.querydsl.jpa.impl.JPAQueryFactory
|
import com.querydsl.jpa.impl.JPAQueryFactory
|
||||||
import ext.logger
|
import ext.logger
|
||||||
|
import ext.thread
|
||||||
import icu.samnyan.aqua.sega.general.BaseHandler
|
import icu.samnyan.aqua.sega.general.BaseHandler
|
||||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.QMai2UserPlaylog
|
import icu.samnyan.aqua.sega.maimai2.model.userdata.QMai2UserPlaylog
|
||||||
import org.springframework.scheduling.annotation.Scheduled
|
import org.springframework.scheduling.annotation.Scheduled
|
||||||
@@ -25,7 +26,7 @@ class GetGameRankingHandler(
|
|||||||
init {
|
init {
|
||||||
// To make sure the cache is initialized before the first request,
|
// To make sure the cache is initialized before the first request,
|
||||||
// not using `initialDelay = 0` in `@Scheduled`.
|
// not using `initialDelay = 0` in `@Scheduled`.
|
||||||
refreshMusicRankingCache()
|
thread { refreshMusicRankingCache() }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(fixedDelay = 3600_000)
|
@Scheduled(fixedDelay = 3600_000)
|
||||||
|
|||||||
Reference in New Issue
Block a user