-
Notifications
You must be signed in to change notification settings - Fork 12
Add cache on startup #717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cache on startup #717
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds a mechanism to warm the MSL community-group member list cache during bot startup, so membership checks don’t pay the initial fetch cost at first command use.
Changes:
- Introduces
update_group_member_list_cache()as a boolean “warm cache” helper aroundfetch_community_group_members_list(). - Re-exports the new helper via
utils.msl. - Adds a new startup
tasks.loop(count=1)cog intended to populate the cache once after the bot is ready.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| utils/msl/memberships.py | Adds a helper to refresh the in-module membership list cache and return success/failure. |
| utils/msl/init.py | Re-exports the new cache-update helper from the utils.msl package. |
| cogs/make_member.py | Adds a one-shot startup task cog intended to warm the member-list cache on bot startup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5cd70a7 to
34e0add
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Matty Widdop <[email protected]>
CarrotManMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy if you want the logging level to be higher if needed, but if you think DEBUG is fine then that's cool with me!
No description provided.