Skip to content

Auto refresh online blocklist#1142

Merged
AttackingOrDefending merged 5 commits intolichess-bot-devs:masterfrom
xu-shawn:refresh_blocklist
Dec 15, 2025
Merged

Auto refresh online blocklist#1142
AttackingOrDefending merged 5 commits intolichess-bot-devs:masterfrom
xu-shawn:refresh_blocklist

Conversation

@xu-shawn
Copy link
Copy Markdown
Contributor

@xu-shawn xu-shawn commented Oct 6, 2025

Type of pull request:

  • Bug fix
  • Feature
  • Other

Description:

The online blocklist introduced in #1104 requires manually refreshing the bot to refresh the blocklist, which can be tedious for long running bots. This PR refactors the online blocklist to a separate class and refresh every time before it is used.

Checklist:

  • I have read and followed the contribution guidelines.
  • I have added necessary documentation (if applicable).
  • The changes pass all existing tests.

@xu-shawn xu-shawn force-pushed the refresh_blocklist branch 3 times, most recently from 3e7971f to f91d7b2 Compare October 6, 2025 22:58
Comment thread lib/blocklist.py Outdated
Comment thread lib/blocklist.py Outdated
Comment thread lib/matchmaking.py
@AttackingOrDefending
Copy link
Copy Markdown
Member

@MarkZH Is this good now?

Comment thread lib/blocklist.py Outdated
@MarkZH
Copy link
Copy Markdown
Collaborator

MarkZH commented Dec 15, 2025

@xu-shawn Be sure to keep an eye on your debug logs when using online block lists. If you start seeing 429 status codes (too many requests) when refreshing, submit another PR to add delays of at least a minute between polling the same url.

@AttackingOrDefending AttackingOrDefending merged commit 1ee9f00 into lichess-bot-devs:master Dec 15, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants