Skip to content

Make modpings rescheduling robust to unfilled cache#2145

Merged
wookie184 merged 2 commits into
mainfrom
mbaruh/modpings-cache
May 1, 2022
Merged

Make modpings rescheduling robust to unfilled cache#2145
wookie184 merged 2 commits into
mainfrom
mbaruh/modpings-cache

Conversation

@mbaruh
Copy link
Copy Markdown
Member

@mbaruh mbaruh commented Apr 22, 2022

Moderators might not get their pingable role back if the discord.py cache is missing members during rescheduling. This PR makes the rescheduling resolve every entry in the redis cache.

Additionally, this adds a check which will remove entries in the redis cache of former moderators.

Additionally, this adds a check which will remove entries in the redis cache of former moderators.
@mbaruh mbaruh requested review from Den4200, jb3 and ks129 as code owners April 22, 2022 00:08
@mbaruh mbaruh added t: bug Something isn't working a: moderation Related to community moderation functionality: (moderation, defcon, verification) p: 2 - normal Normal Priority labels Apr 22, 2022
Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to press submit on this one yesterday 😅

LGTM, just one comment but doesn't really matter in the big picture, since there's a few to change anyway.

from bot.converters import Expiry
from bot.log import get_logger
from bot.utils import time
from bot.utils.members import get_or_fetch_member
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from bot.utils.members import get_or_fetch_member
from botcore.utils.members import get_or_fetch_member

One less to get in the migration :D

Copy link
Copy Markdown
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will merge this now and can do the botcore change some other time

@wookie184 wookie184 enabled auto-merge May 1, 2022 22:37
@wookie184 wookie184 merged commit 919638e into main May 1, 2022
@wookie184 wookie184 deleted the mbaruh/modpings-cache branch May 1, 2022 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: moderation Related to community moderation functionality: (moderation, defcon, verification) p: 2 - normal Normal Priority t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants