Sync sansei branch #1
@ -55,6 +55,7 @@ class ImportScores(
|
|||||||
private val messagingTemplate: SimpMessagingTemplate,
|
private val messagingTemplate: SimpMessagingTemplate,
|
||||||
private val replayCacheService: ReplayCacheService,
|
private val replayCacheService: ReplayCacheService,
|
||||||
) : InitializingBean {
|
) : InitializingBean {
|
||||||
|
val replayCacheEnabled = (System.getenv("REPLAY_CACHE_ENABLED") ?: "0") != "0"
|
||||||
|
|
||||||
private val userToUpdateBucket = mutableListOf<Long>()
|
private val userToUpdateBucket = mutableListOf<Long>()
|
||||||
|
|
||||||
@ -788,6 +789,7 @@ class ImportScores(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (replayCacheEnabled) {
|
||||||
// Insert into replay cache
|
// Insert into replay cache
|
||||||
val replayCacheReplay = ReplayCacheReplay(
|
val replayCacheReplay = ReplayCacheReplay(
|
||||||
score.best_id,
|
score.best_id,
|
||||||
@ -803,6 +805,7 @@ class ImportScores(
|
|||||||
} else {
|
} else {
|
||||||
logger.error("Could not insert replay ${score.id} into replay cache")
|
logger.error("Could not insert replay ${score.id} into replay cache")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.statistics.scoresWithReplayAndAnalyzed++
|
this.statistics.scoresWithReplayAndAnalyzed++
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user