orblivion / desert-atlas

Other
7 stars 1 forks source link

Give up after a few download failures #11

Closed orblivion closed 1 year ago

orblivion commented 1 year ago

As of this writing, downloads retry forever until you restart the server. Let's limit it to several times. It could be an error with the data on the map data server that causes an error on extraction, restarting the download of the same bad data. At very least, I've seen this as I was hacking on the data. Less likely but not impossible in production.

Making this a launch issue because I don't want to leave anyone's grain stuck spinning around for no reason, downloading stuff over and over.

Post-launch, we'll want something more sophisticated. If a download fails, I think we should consider trying it again after a while, or alerting the user and letting them try again later. The error could be with the network or the map data server, which could right itself.

In the long future, we'll likely keep download queues intact between app restarts. We'll wait until we have Go and we can manage the download threads more elegantly. But the Python is Good Enough :tm: for launch.

orblivion commented 1 year ago

https://github.com/orblivion/sandstorm-share-a-map/commit/22bb03a91b705cdc4ee28e3feaa5cb6d169531d0

Will be implemented in the next build