Open Oaphi opened 2 years ago
Sub-issue 1: the server is now started much earlier, but still insufficiently early to be independent of election scraping:
Sub-issue 2: should be fixed as election state can no longer break the bot due to internal try..catch
blocks:
Currently, if the election data ends up invalid, depending on the occurrence of the check, the server is either not started up at all (if the failure happens early or crashes with a 500 on subsequent connects if the rescraper lead to an invalid election state. Latest to date downtime of the bot resulted from Stack Exchange breaking access to nomination pages - we want to avoid crashing if that happens as we can still serve some useful info in the meantime and periodically rescrape to ensure we are up and running as soon as the issue is fixed.
Already working on, documenting to keep track of the updates.
There are two sub-issues that need to be solved as part of this issue:
Election#validate
method is called, and the latter exits earlyScheduledAnnouncement#rescrape
method ends up breaking the bot if the election state is invalid