fishcharlie / AirportStatusBot

This is a social media bot that will post delay information for airports in the United States.
MIT License
0 stars 0 forks source link

Restart resilience #9

Open fishcharlie opened 9 months ago

fishcharlie commented 9 months ago

Currently if we restart the service (for deploying an update) and during that restart (normally only takes a few seconds or so), the FAA posts a new delay, we will miss it.

This is because when the service starts, it gets the delays from the FAA, and that first request won't generate any posts.

We should check to see if we already have a (recent) cached version of the delays from the FAA, and use that on first run instead. If it's not recent, we will have to revert to that slight delay (as to not post duplicate messages).