add tracking cooldown
All checks were successful
Deploy Backend / deploy (push) Successful in 2m16s

This commit is contained in:
Lee 2024-10-11 18:48:04 +01:00
parent d16cf9e4af
commit a0681d7b1c

View File

@ -50,6 +50,7 @@ app.use(
const page = await scoresaberService.lookupPlayers(pageNumber);
if (page === undefined) {
console.log(`Failed to fetch players on page ${pageNumber}, skipping page...`);
await delay(cooldown);
continue;
}
for (const player of page.players) {
@ -57,6 +58,7 @@ app.use(
await PlayerService.trackScoreSaberPlayer(foundPlayer, player);
toRemoveIds.push(foundPlayer.id);
}
await delay(cooldown);
}
console.log(`Finished tracking player statistics for ${pages} pages, found ${toRemoveIds.length} players.`);