bot icon indicating copy to clipboard operation
bot copied to clipboard

Missing Reminders

Open HassanAbouelela opened this issue 4 years ago • 2 comments

For a while now, I've been noticing that my longer reminders are usually removed from the database, without being sent, leading to many missing reminders. I've been digging into it for a while now, but there is nothing noteworthy as far as I could tell.

There is nothing in logs, and there is nothing in the bot behavior that should block reminders. The most recent example I have was scheduled for 1 minute after another reminder. The other reminder was delivered, mine wasn't. I won't be linking the examples here because they are all in internal channels.

To help continue debugging this, and because it is so difficult to reproduce, I'm going to modify the reminder task to not delete entries from the DB, and instead mark them as inactive. I'll continue tracking this issue here.

HassanAbouelela avatar Oct 27 '21 08:10 HassanAbouelela

@Senjan21 managed to find in the logs that there are in fact errors being logged (and we accidentally took down the entire community's infra 😅). user appears to be none in ensure_valid_reminder (my guess is because it's called during bot startup, which most likely means the cache is unpopulated. Can no longer confirm, as the logs have been deleted).

I have a new solution in mind, and will be PRing that instead.

HassanAbouelela avatar Oct 27 '21 17:10 HassanAbouelela

I've spoken with Zig, and we think it's best if on top of the other PR, we try to decouple the reliance on member objects for this cog where possible. Replacing member.mention with manual mentions, and adding a fallback default for role checks are examples of how we could go about that.

HassanAbouelela avatar Feb 04 '22 21:02 HassanAbouelela

I think the original issue here was fixed, though I noticed another way reminders may go missing, which i've opened a new issue for https://github.com/python-discord/bot/issues/3015.

wookie184 avatar Apr 14 '24 17:04 wookie184