bot
bot copied to clipboard
Handling of site connection issues during outage.
Currently, under somewhat specific circumstances the bot might result in few Cogs/Extensions not being loaded if site will drop the connection or otherwise will fail to return relevant information to the bot. Most notably the bot will not load filters cog, superstarify, reminders and python_news.
This issue happens with no indication of a failure to moderators as such bot might end up in a state where filters will be disabled and mods will be none the wiser.
The bot should:
- Alert moderators that such a thing occurred (filters weren't loaded)
- Potentially try to gracefully handle the issue and try to reconnect / retry later.
The cogs won't have been loaded because there was an unhandled error in the async cog_load function.
We should update cogs that rely on site being availalble during cog load to handle errors like this, and retry a few times, with some backoff logic, to be resiliant to temporary site outages.
If the bot still can't load the cogs after a number of attempts, we should then raise an error so that it appears in sentry and can be actioned.