cronokirby/alchemy

Member cache is not always populating

Opened this issue · 5 comments

The member cache, randomly it seems when the system is brought up, will refuse to populate itself and calls like Alchemy.Cache.member(guild_id, id) never return anything until restarted and tested again. When it is not working it returns nothing but {:error, "Failed to find an entry for <whateverID> in section members"}.

This seems to be an issue on discord's part with not sending the information, and not necessarily a problem with the code itself.

This seems to be an issue on discord's part with not sending the information, and not necessarily a problem with the code itself.

Any way to 'bump' it though a few times to try to re-acquire the information? Getting nothing until later reboots is rather empty.

#79 addressed this. See if you encounter the same problem running https://hex.pm/packages/discord_alchemy/0.6.4. If the problem doesn't seem to occurr anymore, we can close this :P

I'll update soon! The bot stays online for extended periods and the cache not working was pretty random, but the commit of the fix looks reliable. I'd say if you don't hear back from me in a few weeks then it's good. I'm going to remove a few of my checks that force it to restart when it detects a dead cache so it should be a bit crashy if it happens at that point. :-)

Thanks much!

Just as an update, it came up without issue twice so far (I decided to update everything while I was at it, so far I've been lucky...).