never refresh ranked leaderboards
All checks were successful
Deploy Backend / docker (ubuntu-latest) (push) Successful in 40s

This commit is contained in:
Lee 2024-10-26 13:27:53 +01:00
parent 7be8c37779
commit 0d39a905f6

@ -48,8 +48,9 @@ export default class LeaderboardService {
if (cachedLeaderboard != null) { if (cachedLeaderboard != null) {
leaderboard = cachedLeaderboard as unknown as ScoreSaberLeaderboard; leaderboard = cachedLeaderboard as unknown as ScoreSaberLeaderboard;
if ( if (
leaderboard.lastRefreshed == undefined || leaderboard.ranked || // Never refresh ranked leaderboards (it will get refreshed every night)
now.getTime() - leaderboard.lastRefreshed.getTime() > 1000 * 60 * 60 * 24 leaderboard.lastRefreshed == undefined || // Refresh if it has never been refreshed
now.getTime() - leaderboard.lastRefreshed.getTime() > 1000 * 60 * 60 * 24 // Refresh every day
) { ) {
foundLeaderboard = true; foundLeaderboard = true;
} }