Skip to content

Commit

Permalink
Slowed request to lichess
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-dziurdziak committed Dec 2, 2023
1 parent 6cf3e92 commit e908b13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build_scripts/lichess/LichessClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface ImportGameOutResponse {
}

class LichessClient {
private rateLimiter: RateLimiter = new RateLimiter(1_000)
private rateLimiter: RateLimiter = new RateLimiter(5_000)

public async importGame(pgn: string): Promise<ImportGameOutResponse> {
await this.rateLimiter.assertDelay()
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/nodeActions/loadMissingData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async function importMissingLichessGamesIds() {

videosWithMissingGamesIds = _.shuffle(videosWithMissingGamesIds)

for (const id of videosWithMissingGamesIds.slice(0, 100)) {
for (const id of videosWithMissingGamesIds.slice(0, 20)) {
try {
await lichessService.importGames(id)
} catch (e) {
Expand Down

0 comments on commit e908b13

Please sign in to comment.