fetch player data less often
All checks were successful
deploy / deploy (push) Successful in 56s

This commit is contained in:
Lee 2023-10-23 16:44:57 +01:00
parent 9959c5e607
commit dc2d502dfa
2 changed files with 2 additions and 2 deletions

@ -120,7 +120,7 @@ export const useScoresaberScoresStore = create<ScoreSaberScoresStore>()(
while (search) { while (search) {
page++; page++;
const newScores = await ScoreSaberAPI.fetchScores(playerId, page); const newScores = await ScoreSaberAPI.fetchScores(playerId, page);
console.log("Scanning page", page, "for", playerId); console.log(`Fetched page ${page} for ${playerId}...`);
if (newScores?.scores.length == 0 || newScores == undefined) break; if (newScores?.scores.length == 0 || newScores == undefined) break;
// Call the callback if it exists // Call the callback if it exists

@ -26,7 +26,7 @@ interface SettingsStore {
getProfile(playerId: string): ScoresaberPlayer | undefined; getProfile(playerId: string): ScoresaberPlayer | undefined;
} }
const UPDATE_INTERVAL = 1000 * 60 * 10; // 10 minutes const UPDATE_INTERVAL = 1000 * 60 * 60; // 1 hour
export const useSettingsStore = create<SettingsStore>()( export const useSettingsStore = create<SettingsStore>()(
persist( persist(